L20n/Firefox/Performance: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 30: Line 30:
* 2ms create chrome resource bundle
* 2ms create chrome resource bundle
* 6ms .... connecting the dots
* 6ms .... connecting the dots
== Potential Performance improvements ==
=== Caching ===
We're currently caching I/O, but in order to target tpaint we can optimize more elements that are reused on every new window open:
* cache MessageContext or Localization objects
* cache formatted entries
* cache localized DOM
=== Move DOM operations earlier ===
Currently, the best tpaint times gives us executing DOM operations on document.readyState === 'complete'.
That means that we're waiting for a lot of time between when DOM is completed and when we operate on DOM potentially causing reflows.
Unfortunately, attempting to start DOM operations between when parsing is done and when layout starts results in worse tpaint times (see below).
The possible cause of it, according to :smaug, is that operating on DOM before layout may require costly CSS lookups for XBL bindings.  It's possible that stylo may solve some of that.
Another possibility that we're experimenting with is triggering localization to happen after layout but before reflow.
=== Optimize DOM pathways we use extensively ===
:smaug is profiling our code trying to find ways to reduce the cost of Element reflections and applying translations.


==Research Avenues==
==Research Avenues==
Confirmed users
1,016

edits