Bug 87502 - Web Inspector: speed-up HeapSnapshot._bfs method.
Summary: Web Inspector: speed-up HeapSnapshot._bfs method.
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: Ilya Tikhonovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-25 07:59 PDT by Ilya Tikhonovsky
Modified: 2012-05-25 08:41 PDT (History)
11 users (show)

See Also:


Attachments
Patch (4.27 KB, patch)
2012-05-25 08:01 PDT, Ilya Tikhonovsky
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2012-05-25 07:59:52 PDT
it had containmentEdges.length call in the loop.
 
before
RESULT heap-snapshot: _calculateObjectToWindowDistance= 117 ms
after
RESULT heap-snapshot: _calculateObjectToWindowDistance= 36 ms
Comment 1 Ilya Tikhonovsky 2012-05-25 08:01:46 PDT
Created attachment 144069 [details]
Patch
Comment 2 Yury Semikhatsky 2012-05-25 08:31:20 PDT
Comment on attachment 144069 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=144069&action=review

> Source/WebCore/inspector/front-end/HeapSnapshot.js:934
> +                nodesToVisit[nodesToVisitLength++] = childNodeIndex;

Please add an assert that nodesToVisitLength <= this.nodeCount
Comment 3 Ilya Tikhonovsky 2012-05-25 08:41:09 PDT
Committed r118529: <http://trac.webkit.org/changeset/118529>