canmove, Confirmed users
1,448
edits
(→Hypothesis 1: IO Is Slow: it doesn't matter when IO starts) |
|||
| Line 17: | Line 17: | ||
* see why NetUtil is slower than XHR | * see why NetUtil is slower than XHR | ||
* ask for API extension to get a better priority for l10n files in the ZipReader queue | * ask for API extension to get a better priority for l10n files in the ZipReader queue | ||
It doesn't really matter when exactly the IO starts. In (A) all of L20n's initialization is run after the documentReady() promise resolves. In (B) the IO starts as soon as possible (as soon as we can query for <link rel="localization">). | |||
(A) IO starts: 100 ms, IO ends: 140 ms, | |||
(B) IO starts: 40 ms, IO ends: 140 ms. | |||
In (B) we still need to guard the initial translation of the document with documentReady(). The reason for this is that we can't rely on the unguarded MutationObserver in XUL documents: {{bug|1294197}}. | |||
==Hypothesis 2: NodeList Iteration Is Slow== | ==Hypothesis 2: NodeList Iteration Is Slow== | ||