[Webkit-unassigned] [Bug 18955] New: CachedScript and CachedCSSStyleSheet double-retain memory

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 8 15:53:52 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=18955

           Summary: CachedScript and CachedCSSStyleSheet double-retain
                    memory
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mike at belshe.com


CachedScript and CachedCSSStyleSheet both derive from CachedResource. 
CachedResource contains a StringBuffer m_data.

Internally, when data is assigned to the CachedScript and CachedCSSStyleSheet,
they decode the m_data buffer, and store the result into a private string
(m_script and m_sheet, respectively).

Thus, each of these objects has two in-memory copies of the cached object.  The
m_data is actually not needed and can be removed.  The only thing which uses it
is the InspectorController; and that usage can be removed with a small amount
of work.

For www.cnn.com, this led to a 600KB footprint reduction.
For www.yahoo.com, this led to a ~2MB footprint reduction.

I will post a patch when it's ready.


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



More information about the webkit-unassigned mailing list