Closed
Bug 1300753
Opened 8 years ago
Closed 8 years ago
Trigger document localization on readystate=complete
Categories
(L20n :: JS Library, defect)
L20n
JS Library
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stas, Assigned: stas)
Details
(Whiteboard: [gecko-l20n])
In bug 1299184 we switched to triggering on MozBeforeLayout. This resulted in our code starting much earlier and finishing a bit earlier too, but we're also the first code to touch the DOM with our querySelectorAll which now takes close to 40ms instead of 4ms. There is no evidence that this improves our Talos scores, but makes it a bit harder to understand the profiles. Let's switch (back) to triggering when the DOM is ready. I suggest we use DOMContentLoaded this time instead of using a documentReady() promise shim.
Assignee | ||
Comment 1•8 years ago
|
||
I'll need to do some more testing but it looks like DOMContentLoaded might still be a bit too early and we end up costing ~45ms on larch. Let's revert back to using the documentReady() promise.
Summary: Trigger document localization on DOMContentLoaded → Trigger document localization on readystate=complete
Assignee | ||
Comment 2•8 years ago
|
||
https://hg.mozilla.org/projects/larch/rev/236f750b6a3002e91e551fd6c2ddec63995a6e0e Bug 1300753 - Trigger document localization on readystate=complete
Assignee | ||
Comment 3•8 years ago
|
||
https://github.com/l20n/l20n.js/commit/74148156d47dcbb922e09faeab63de4456cc6f70
Assignee: nobody → stas
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•