Bug 82703 - Web Inspector: preload field values into local variables for better heap profiler performance
Summary: Web Inspector: preload field values into local variables for better heap prof...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-30 01:28 PDT by Yury Semikhatsky
Modified: 2012-03-30 06:25 PDT (History)
11 users (show)

See Also:


Attachments
Patch (11.35 KB, patch)
2012-03-30 01:39 PDT, Yury Semikhatsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2012-03-30 01:28:17 PDT
We can achieve noticeable improvement in the heap profiler front-end performance by using local variables instead of object fields in several hot places.
Comment 1 Yury Semikhatsky 2012-03-30 01:39:35 PDT
Created attachment 134744 [details]
Patch
Comment 2 Yury Semikhatsky 2012-03-30 01:41:21 PDT
(In reply to comment #1)
> Created an attachment (id=134744) [details]
> Patch

WebKit/PerformanceTests/inspector/detailed-heapshots-smoke-test.html results:

Before the change:

RESULT heap-snapshot: take-snapshot= 4941 ms
RESULT heap-snapshot: transfer-snapshot= 8657 ms
RESULT heap-snapshot: _splitNodesAndContainmentEdges= 2213 ms
RESULT heap-snapshot: _buildRetainers= 2083 ms
RESULT heap-snapshot: _buildDominatedNodes= 188 ms
RESULT heap-snapshot: _markDetachedDOMTreeNodes= 7 ms
RESULT heap-snapshot: _markQueriableHeapObjects= 1601 ms
RESULT heap-snapshot: _calculateFlags= 1608 ms
RESULT heap-snapshot: _calculateObjectToWindowDistance= 2230 ms
RESULT heap-snapshot: show-snapshot= 11790 ms
RESULT heap-snapshot: _buildAggregates= 4702 ms
RESULT heap-snapshot: switch-to-containment-view= 5040 ms
RESULT heap-snapshot: full-summary-snapshot-time= 30428 ms
RESULT heap-snapshot: clear-snapshot= 63 ms
RESULT heap-delta: detailed-heapshots-smoke-test= 442 kB


After the change:

RESULT heap-snapshot: take-snapshot= 4850 ms
RESULT heap-snapshot: transfer-snapshot= 9187 ms
RESULT heap-snapshot: _splitNodesAndContainmentEdges= 879 ms
RESULT heap-snapshot: _buildRetainers= 527 ms
RESULT heap-snapshot: _buildDominatedNodes= 199 ms
RESULT heap-snapshot: _markDetachedDOMTreeNodes= 4 ms
RESULT heap-snapshot: _markQueriableHeapObjects= 1835 ms
RESULT heap-snapshot: _calculateFlags= 1839 ms
RESULT heap-snapshot: _calculateObjectToWindowDistance= 1238 ms
RESULT heap-snapshot: show-snapshot= 8601 ms
RESULT heap-snapshot: _buildAggregates= 4972 ms
RESULT heap-snapshot: switch-to-containment-view= 5336 ms
RESULT heap-snapshot: full-summary-snapshot-time= 27975 ms
RESULT heap-snapshot: clear-snapshot= 68 ms
RESULT heap-delta: detailed-heapshots-smoke-test= 299 kB
Comment 3 Ilya Tikhonovsky 2012-03-30 01:48:16 PDT
Comment on attachment 134744 [details]
Patch

lgtm
Comment 4 Yury Semikhatsky 2012-03-30 06:25:19 PDT
Committed r112660: <http://trac.webkit.org/changeset/112660>