Bug 22093 - Don't keep decoded stylesheet data in cache
Summary: Don't keep decoded stylesheet data in cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-05 18:11 PST by Antti Koivisto
Modified: 2008-11-06 23:23 PST (History)
0 users

See Also:


Attachments
patch (3.01 KB, patch)
2008-11-05 18:14 PST, Antti Koivisto
mitz: review+
Details | Formatted Diff | Diff
fix the regression (2.74 KB, patch)
2008-11-06 22:56 PST, Antti Koivisto
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2008-11-05 18:11:28 PST
Don't keep decoded stylesheet string around in the cache. There are no sharing benefits and performance benefits are negligible.
Comment 1 Antti Koivisto 2008-11-05 18:14:57 PST
Created attachment 24930 [details]
patch

Decode stylesheet data on demand
Comment 2 mitz 2008-11-05 18:38:39 PST
Comment on attachment 24930 [details]
patch

> +        https://bugs.webkit.org/post_bug.cgi

Bad link.

r=me
Comment 3 Antti Koivisto 2008-11-05 18:41:10 PST
Sending        WebCore/ChangeLog
Sending        WebCore/loader/CachedCSSStyleSheet.cpp
Sending        WebCore/loader/CachedCSSStyleSheet.h
Transmitting file data ...
Committed revision 38147.
Comment 4 Antti Koivisto 2008-11-06 22:49:06 PST
This caused regression in fast/encoding/css-charset-default.xhtml
Comment 5 Antti Koivisto 2008-11-06 22:56:31 PST
Created attachment 24966 [details]
fix the regression
Comment 6 mitz 2008-11-06 23:11:33 PST
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
Comment 7 Antti Koivisto 2008-11-06 23:17:58 PST
(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
> 

Comment 8 Antti Koivisto 2008-11-06 23:23:09 PST
Sending        WebCore/ChangeLog
Sending        WebCore/loader/CachedCSSStyleSheet.cpp
Sending        WebCore/loader/CachedCSSStyleSheet.h
Transmitting file data ...
Committed revision 38213.