Bug 173746 - Web Inspector: Script Timeline bubbles sometimes appear to miss large events
Summary: Web Inspector: Script Timeline bubbles sometimes appear to miss large events
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-06-22 16:52 PDT by Joseph Pecoraro
Modified: 2017-06-23 19:46 PDT (History)
4 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.14 KB, patch)
2017-06-22 16:54 PDT, Joseph Pecoraro
bburg: review+
Details | Formatted Diff | Diff
[IMAGE] Before - Missing Script that triggered Layout (187.61 KB, image/png)
2017-06-22 16:54 PDT, Joseph Pecoraro
no flags Details
[IMAGE] After - Larger Script bubbles including overlap (183.67 KB, image/png)
2017-06-22 16:54 PDT, Joseph Pecoraro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-06-22 16:52:22 PDT
Summary:
Script Timeline bubbles sometimes appear to miss large events.

In some cases I've seen a Script event, like a Timer Firing, taking "500ms" but not see a bubble in the timeline matching that size.

This makes the script bubbles look suspiciously small, and in the case of Layout + Rendering triggered by script I'd expect to see overlap between the two.
Comment 1 Joseph Pecoraro 2017-06-22 16:54:12 PDT
Created attachment 313672 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2017-06-22 16:54:36 PDT
Created attachment 313673 [details]
[IMAGE] Before - Missing Script that triggered Layout
Comment 3 Joseph Pecoraro 2017-06-22 16:54:59 PDT
Created attachment 313674 [details]
[IMAGE] After - Larger Script bubbles including overlap
Comment 4 BJ Burg 2017-06-23 10:36:00 PDT
Comment on attachment 313672 [details]
[PATCH] Proposed Fix

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

r=me

> Source/WebInspectorUI/UserInterface/Models/Timeline.js:74
> +        // Because records can be nested, its posisble that outer records with an early start time

Nit: possible

> Source/WebInspectorUI/UserInterface/Models/Timeline.js:133
> +    _tryInsertInSortedOrder(record)

The name seems funny to me without mentioning 'record' somehow. Maybe Objective-C has corrupted me.

> Source/WebInspectorUI/UserInterface/Models/Timeline.js:144
> +        let end = Math.max(this._records.length - 20, 0);

Likewise, these were terse and I thought they were backwards given the for loop header. Maybe earliestRecordIndex and latestRecordIndex?
Comment 5 Radar WebKit Bug Importer 2017-06-23 10:37:15 PDT
<rdar://problem/32950808>
Comment 6 Joseph Pecoraro 2017-06-23 19:46:33 PDT
<https://trac.webkit.org/r218781>