Reviewed by Geoff.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2007 23:44:17 +0000 (23:44 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2007 23:44:17 +0000 (23:44 +0000)
commit0115bda57b24c34b72fb1faebbec2b31437c0945
treefa34365b7287971f952bc2a74eea84d1f972abbb
parenta90b5336967540bc718a12047f269c8eecdb8a86
    Reviewed by Geoff.

        <rdar://problem/5326126> InspectorResource holds onto more data than it needs

        Reduces the fixed size of InspectorResource from 630 bytes to 224 bytes. Now
        selectively pick out parts of the ResourceRequest and ResourceResponse objects
        for the info needed and store that directly in InspectorResource.

        The ResourceRequest and ResourceResponse objects hold a reference to the original
        NSURL object, so almost double the data was being kept around. So the struct size
        reduction is just the tip of the ice burg on what this really saves.

        In a test of 100,000 XMLHTTPRequests using a 85 byte long data URL, I see ~21 MB less
        RSIZE compared to Safari running without this change.

        * page/InspectorController.cpp:
        (WebCore::InspectorResource::InspectorResource):
        (WebCore::InspectorResource::type):
        (WebCore::addSourceToFrame):
        (WebCore::scriptObjectForRequest):
        (WebCore::scriptObjectForResponse):
        (WebCore::InspectorController::addScriptResource):
        (WebCore::InspectorController::addAndUpdateScriptResource):
        (WebCore::updateResourceRequest):
        (WebCore::updateResourceResponse):
        (WebCore::InspectorController::updateScriptResourceRequest):
        (WebCore::InspectorController::updateScriptResourceResponse):
        (WebCore::InspectorController::didLoadResourceFromMemoryCache):
        (WebCore::InspectorController::identifierForInitialRequest):
        (WebCore::InspectorController::willSendRequest):
        (WebCore::InspectorController::didReceiveResponse):
        (WebCore::InspectorController::didFailLoading):
        * page/InspectorController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/page/InspectorController.cpp
WebCore/page/InspectorController.h