Closed Bug 1289535 Opened 8 years ago Closed 8 years ago

Speed up l20n-chrome-xul

Categories

(L20n :: JS Library, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stas, Assigned: zbraniecki)

References

Details

Zibi's tests in bug 1288665 indicate that the XULLocalization + ChromeLocalizationObserver are slow.

We should find a way to speed them up to be able to offer a competitive solution to the current DTD/properties combo.
AFAICT, the outcome from our meeting was that we're not slow, but late.
I'd like to experiment with removing the documentReady() promise first.  It looks like we could instead require the <link rel="localization"> elements to be put above the <script src="l20n.js"> at which point the l20n.js script will be able to simply querySelector() them.

Another alternative which Zibi has suggested is to set up a MutationObserver very early on and catch any <link rel="localization"> elements as they're inserted into <head>.  This might be a bit more work but could possibly give good results too.
Assignee: nobody → gandalf
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.