Bug 87502

Summary: Web Inspector: speed-up HeapSnapshot._bfs method.
Product: WebKit Reporter: Ilya Tikhonovsky <loislo>
Component: Web Inspector (Deprecated)Assignee: Ilya Tikhonovsky <loislo>
Status: RESOLVED FIXED    
Severity: Normal CC: alph, apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch yurys: review+

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>