RESOLVED FIXED 82703
Web Inspector: preload field values into local variables for better heap profiler performance
https://bugs.webkit.org/show_bug.cgi?id=82703
Summary Web Inspector: preload field values into local variables for better heap prof...
Yury Semikhatsky
Reported 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.
Attachments
Patch (11.35 KB, patch)
2012-03-30 01:39 PDT, Yury Semikhatsky
pfeldman: review+
Yury Semikhatsky
Comment 1 2012-03-30 01:39:35 PDT
Yury Semikhatsky
Comment 2 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
Ilya Tikhonovsky
Comment 3 2012-03-30 01:48:16 PDT
Comment on attachment 134744 [details] Patch lgtm
Yury Semikhatsky
Comment 4 2012-03-30 06:25:19 PDT
Note You need to log in before you can comment on or make changes to this bug.