Bug 87482 - Web Inspector: HeapProfiler: speed-up _calculateClassesRetainedSize and _buildAggregates
Summary: Web Inspector: HeapProfiler: speed-up _calculateClassesRetainedSize and _buil...
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 02:56 PDT by Ilya Tikhonovsky
Modified: 2012-05-28 00:57 PDT (History)
12 users (show)

See Also:


Attachments
Patch (1.78 KB, patch)
2012-05-25 03:00 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 02:56:45 PDT
engine didn't inline node's classIndex method because the switch statement in it wasn't inlineable.

Before:
RESULT heap-snapshot: _buildAggregates= 642 ms
RESULT heap-snapshot: _calculateClassesRetainedSize= 738 ms

After:
RESULT heap-snapshot: _buildAggregates= 335 ms
RESULT heap-snapshot: _calculateClassesRetainedSize= 411 ms
Comment 1 Ilya Tikhonovsky 2012-05-25 03:00:02 PDT
Created attachment 144020 [details]
Patch
Comment 2 Ilya Tikhonovsky 2012-05-25 03:16:12 PDT
Committed r118509: <http://trac.webkit.org/changeset/118509>
Comment 3 Oliver Hunt 2012-05-25 10:47:02 PDT
I would have argued that that's an engine bug, and not necessarily something that we should be rewriting js for.
Comment 4 Yury Semikhatsky 2012-05-28 00:57:26 PDT
(In reply to comment #3)
> I would have argued that that's an engine bug, and not necessarily something that we should be rewriting js for.

This is definitely an engine's flaw but given that in this case we get a noticeable performance effect without affecting the code readability and that we don't have an estimation on when the bug may be fixed in the engine I think it makes sense to fix it this way.