L. David Baron wrote:
I've been thinking about more things that we can share in the style
system (i.e., objects that we currently have separate instances of
for separate documents, but that could be shared between documents).
The idea would be both to improve performance of XUL (identical
documents and not-identical documents) and to improve performance of
Web pages on the same site.

In particular, I think we could do the following things:

(1) Have style sheets in an nsExpirationTracker-based cache.  (I
want them to expire a few seconds after leaving a page that uses
them, in case the leaving a page is in order to go to another page
that uses the same style sheets, which is reasonably common.)  This
probably needs to (a) be a cache of (origin * style sheet), not just
style sheet, and (b) revalidate the style sheet with the Necko cache
and only re-use it if the Necko cache says it's still the same.  I'm
not sure how easy it would be to do (b).
...
Step (1) will reduce memory footprint and time spent parsing CSS
when using multiple pages on the same site or multiple XUL documents
using the same style sheets (or do we already have some
optimizations here that I'm forgetting?).  It will also mean we'll
have identical CSS rules for sharing in steps (3) and (4).

Wouldn't the multiprocess stuff annul any memory benefits here?

(I don't actually know anything about threads or processes, but
thought they might be relevant here.)

~fantasai
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to