[Webkit-unassigned] [Bug 85004] Cache parsed stylesheets

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 27 13:02:51 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=85004





--- Comment #9 from Antti Koivisto <koivisto at iki.fi>  2012-04-27 13:02:51 PST ---
(In reply to comment #8)
> > Source/WebCore/css/CSSStyleSheet.cpp:83
> > +    // FIXME: This ignores the children of media and region rules.
> > +    // Most rules are StyleRules.
> 
> I’m not sure this should say FIXME unless you actually think it needs to be fixed.

It might be worth fixing. Note that the two comments are really on different topic. The first one is about counting the rules, the second one is about the multiplier.

> > Source/WebCore/css/StylePropertySet.cpp:1003
> > +unsigned StylePropertySet::averageSizeInBytes()
> 
> Do we really want to pay function call overhead for this? Why not just put it inline in the header?

That would requires including headers from header that can currently be avoided, or moving the code away from the classes that we are being measured.

The function is not called often. I think other factors are more important.

> > Source/WebCore/html/HTMLLinkElement.cpp:311
> > +        m_sheet = CSSStyleSheet::create(restoredSheet, this);
> > +        m_loading = false;
> > +        sheetLoaded();
> > +        notifyLoadedSheetAndAllCriticalSubresources(false);
> 
> This is the kind of code I find almost impossible to review. Are these the key lines of code to call to simulate a successfully loaded sheet? Is this now synchronous where the old code path was asynchronous? I don’t know how to tell.

The right solution is to factor the load completion code better. It is a mess. I have refactored quite a bit to make this patch possible but I didn't get into that yet.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list