Don't keep decoded stylesheet string around in the cache. There are no sharing benefits and performance benefits are negligible.
Created attachment 24930 [details] patch Decode stylesheet data on demand
Comment on attachment 24930 [details] patch > + https://bugs.webkit.org/post_bug.cgi Bad link. r=me
Sending WebCore/ChangeLog Sending WebCore/loader/CachedCSSStyleSheet.cpp Sending WebCore/loader/CachedCSSStyleSheet.h Transmitting file data ... Committed revision 38147.
This caused regression in fast/encoding/css-charset-default.xhtml
Created attachment 24966 [details] fix the regression
Comment on attachment 24966 [details] fix the regression You could use a file static for the decoded text and save the cost of a String in every CachedCSSStyleSheet, but would not be very elegant. + if (!m_decodedSheetText.isNull()) I thought you could write just if (m_decodedSheetText) but perhaps you can't. r=me
(In reply to comment #6) > (From update of attachment 24966 [details] [edit]) > You could use a file static for the decoded text and save the cost of a String > in every CachedCSSStyleSheet, but would not be very elegant. Not very elegant plus there is bound to be some crazy way this recurses... > + if (!m_decodedSheetText.isNull()) > > I thought you could write just if (m_decodedSheetText) but perhaps you can't. True. All these fancy operators. Fixed. > > r=me >
Sending WebCore/ChangeLog Sending WebCore/loader/CachedCSSStyleSheet.cpp Sending WebCore/loader/CachedCSSStyleSheet.h Transmitting file data ... Committed revision 38213.