Bug 158491 - Web Inspector: reduce timer churn when processing many DOM.attributeModified messages
Summary: Web Inspector: reduce timer churn when processing many DOM.attributeModified ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Brian Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-07 13:36 PDT by Brian Burg
Modified: 2016-06-07 17:30 PDT (History)
8 users (show)

See Also:


Attachments
Proposed Fix (7.15 KB, patch)
2016-06-07 13:57 PDT, Brian Burg
timothy: review+
bburg: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2016-06-07 13:36:23 PDT
This patch fixes two issues at play in 142466 and 156250.

We currently use the Object.debounce/Object.soon proxy to try to coalesce calls to DOMTreeUpdater._attributesModified. Unfortunately, this doesn't coalesce very many calls because .soon is equivalent to using setTimeout(0). So we end up setting and clearing a timer for every attribute modification, and only coalesce calls until the timer fires. This means we also update the DOMTreeOutline multiple times per frame because this work is not done on a requestAnimationFrame, and the timer could fire many times in a frame's time slice.
Comment 1 Brian Burg 2016-06-07 13:36:37 PDT
<rdar://problem/25561452>
Comment 2 Brian Burg 2016-06-07 13:57:22 PDT
Created attachment 280736 [details]
Proposed Fix
Comment 3 Brian Burg 2016-06-07 17:30:41 PDT
Committed r201778: <http://trac.webkit.org/changeset/201778>