Bug 81224 - Web Inspector: improve HeapSnapshot._buildReversIndex performance
Summary: Web Inspector: improve HeapSnapshot._buildReversIndex performance
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-15 09:05 PDT by Yury Semikhatsky
Modified: 2012-03-15 09:40 PDT (History)
10 users (show)

See Also:


Attachments
Patch (2.73 KB, patch)
2012-03-15 09:07 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-15 09:05:46 PDT
Caching node indexes and node count in local variables instead of calling getters each time reduces the method run time by factor of 1.5
Comment 1 Yury Semikhatsky 2012-03-15 09:07:26 PDT
Created attachment 132059 [details]
Patch
Comment 2 Yury Semikhatsky 2012-03-15 09:10:54 PDT
For the WebKit/PerformanceTests/inspector/detailed-heapshots-smoke-test.html test with the patch applied:
RESULT heap-snapshot: _buildDominatedNodes= 2857 ms
without:
RESULT heap-snapshot: _buildDominatedNodes= 4417 ms
Comment 3 Yury Semikhatsky 2012-03-15 09:40:24 PDT
Committed r110853: <http://trac.webkit.org/changeset/110853>