Bug 145066 - Web Inspector: Reduce type annotation update frequency
Summary: Web Inspector: Reduce type annotation update frequency
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2015-05-15 12:27 PDT by Joseph Pecoraro
Modified: 2016-09-07 21:44 PDT (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.56 KB, patch)
2015-05-15 12:28 PDT, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff
[PATCH] For Landing (1.56 KB, patch)
2015-05-15 13:37 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-05-15 12:27:50 PDT
* SUMMARY
Reduce type annotation update frequency.

I was seeing Runtime.getRuntimeTypesForVariablesAtOffsets happening every 16-24ms in the case where nothing is changing. That is unnecessarily frequent. Lets reduction this to 100ms - 2000ms (worst case).
Comment 1 Joseph Pecoraro 2015-05-15 12:28:57 PDT
Created attachment 253215 [details]
[PATCH] Proposed Fix
Comment 2 Saam Barati 2015-05-15 12:46:57 PDT
Comment on attachment 253215 [details]
[PATCH] Proposed Fix

Looks good to me. 
At some point I work on the patch that makes it so we only
update when we need to. This would have the consequence
of never updating when code stops running which would be
a big win.
Comment 3 Saam Barati 2015-05-15 12:49:30 PDT
(In reply to comment #0)
> * SUMMARY
> Reduce type annotation update frequency.
> 
> I was seeing Runtime.getRuntimeTypesForVariablesAtOffsets happening every
> 16-24ms in the case where nothing is changing. That is unnecessarily
> frequent. Lets reduction this to 100ms - 2000ms (worst case).

It looks like the code has the maximum at 1000, not sure if you want
to make it 2000 or keep it at 1000
Comment 4 Timothy Hatcher 2015-05-15 13:00:31 PDT
Comment on attachment 253215 [details]
[PATCH] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Controllers/TypeTokenAnnotator.js:71
> +            var timeoutTime = Math.max(100, Math.min(1000, 8 * totalTime));

ChangeLog says 2000, code says 1000.
Comment 5 Joseph Pecoraro 2015-05-15 13:27:45 PDT
(In reply to comment #4)
> Comment on attachment 253215 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=253215&action=review
> 
> > Source/WebInspectorUI/UserInterface/Controllers/TypeTokenAnnotator.js:71
> > +            var timeoutTime = Math.max(100, Math.min(1000, 8 * totalTime));
> 
> ChangeLog says 2000, code says 1000.

Oops. I'll make it 2000. At one point I did see a 1.2s being possible.
Comment 6 Joseph Pecoraro 2015-05-15 13:37:59 PDT
Created attachment 253220 [details]
[PATCH] For Landing
Comment 7 WebKit Commit Bot 2015-05-15 14:37:32 PDT
Comment on attachment 253220 [details]
[PATCH] For Landing

Clearing flags on attachment: 253220

Committed r184418: <http://trac.webkit.org/changeset/184418>