[Webkit-unassigned] [Bug 82325] Web Inspector: Speed up heap profiler snapshot parsing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 27 07:25:25 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=82325





--- Comment #4 from alexeif at chromium.org  2012-03-27 07:25:25 PST ---
(From update of attachment 134031)
View in context: https://bugs.webkit.org/attachment.cgi?id=134031&action=review

>> Source/WebCore/inspector/front-end/HeapSnapshot.js:1227
>> +        var edgesCountOffset = this._edgesCountOffset;
> 
> We can just inline these as there is no performance gain.

done

>> Source/WebCore/inspector/front-end/HeapSnapshot.js:1231
>> +        for (var i = 1, l = nodes.length; i < l; ++count) {
> 
> rootNodeIndex?

done

>> Source/WebCore/inspector/front-end/HeapSnapshot.js:1238
>> +        for (var i = 1, l = nodes.length; i < l; ++count) {
> 
> ditto

done

>> Source/WebCore/inspector/front-end/HeapSnapshot.js:1272
>> +        var nodeIndexes = this.nodeIndexes;
> 
> Consider inlining these as well.

done

>>> Source/WebCore/inspector/front-end/HeapSnapshot.js:1291
>>> +        var dominatedNodes = this._dominatedNodes = new Int32Array(nodeCount + 1);
>> 
>> ditto
> 
> Int32Array -> Uint32Array, length of the dominatedNodes array should be equal to sum of all indexArrat values at this point, not nodeCount+1

it is nodeCount - 1, as each node except for root has one dominator.

>> Source/WebCore/inspector/front-end/HeapSnapshot.js:1389
>> +        var flags = this._flags;
> 
> Please inline these.

done

>> Source/WebCore/inspector/front-end/HeapSnapshot.js:1403
>> +            edge._edges = node.rawEdges;
> 
> Why not take node.edges? Could you at least introduce a public setter on the edge?

node.edges is an iterator which I'd like to avoid. Don't wanna introduce a setter, we don't have them for nodeIndex and edgeIndex.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list