RESOLVED FIXED Bug 150689
Web Inspector: Handle or Remove ParseHTML Timeline Event Records
https://bugs.webkit.org/show_bug.cgi?id=150689
Summary Web Inspector: Handle or Remove ParseHTML Timeline Event Records
Joseph Pecoraro
Reported 2015-10-29 14:10:21 PDT
* SUMMARY Handle or Remove ParseHTML Timeline Event Records. Are these records worth showing? Do they account for non-trivial amounts of time / markers? Should they just be removed?
Attachments
[PATCH] Proposed Fix (13.52 KB, patch)
2015-11-03 11:34 PST, Joseph Pecoraro
no flags
[PATCH] Proposed Fix (13.71 KB, patch)
2015-11-03 11:38 PST, Joseph Pecoraro
no flags
Radar WebKit Bug Importer
Comment 1 2015-10-29 14:11:17 PDT
Timothy Hatcher
Comment 2 2015-10-29 15:13:41 PDT
I vote for removing it. If we showed it, I would want to see JS and CSS parse time too.
Joseph Pecoraro
Comment 3 2015-10-29 17:00:09 PDT
Loading cnn.com ParseHTML happened 553 times. Of those 553, only 15 were greater than 0.1ms. They were: ParseHTML 0.10ms ParseHTML 0.37ms ParseHTML 0.41ms ParseHTML 0.56ms ParseHTML 0.66ms ParseHTML 0.77ms ParseHTML 1.10ms ParseHTML 1.36ms ParseHTML 1.43ms ParseHTML 1.72ms ParseHTML 3.03ms ParseHTML 43.2ms ParseHTML 70.4ms ParseHTML 104ms ParseHTML 112ms A handful were long blocks of time (100ms+) which seem worth including in the timeline. But I haven't yet checked the nesting of these.
Joseph Pecoraro
Comment 4 2015-10-29 22:22:07 PDT
> A handful were long blocks of time (100ms+) which seem worth including in > the timeline. But I haven't yet checked the nesting of these. This is misleading. It turns out ParseHTML can have children, such as EvaluateScript, and that would then be where the majority of time is spent. I should recalculate these and determine just the time associated with parsing HTML itself, which may therefore be much smaller.
Blaze Burg
Comment 5 2015-10-30 10:32:39 PDT
I think the only time it would be worth seeing is if it were unusually large. Perhaps you should test this on the all-in-one HTML5 spec page. http://www.w3.org/TR/html5/single-page.html
Blaze Burg
Comment 6 2015-10-30 10:33:46 PDT
(In reply to comment #5) > I think the only time it would be worth seeing is if it were unusually > large. Perhaps you should test this on the all-in-one HTML5 spec page. > > http://www.w3.org/TR/html5/single-page.html It would be useful to know when large JS or JSON took a long time to parse too, but I think that would be a different parse record.
Timothy Hatcher
Comment 7 2015-10-30 11:07:01 PDT
I'm pretty sure these ParseHTML records will always be small, given how the parser handles incoming data in small chunks from the network. It also starts and stops as it hits <script> and <style> tags.
Joseph Pecoraro
Comment 8 2015-11-02 15:25:43 PST
(In reply to comment #6) > (In reply to comment #5) > > I think the only time it would be worth seeing is if it were unusually > > large. Perhaps you should test this on the all-in-one HTML5 spec page. > > > > http://www.w3.org/TR/html5/single-page.html Reloading this page there were: - 805 ParseHTML records - Ranging from 0.01ms - 9.23ms accounting for children - The longest ParseHTML records were solely parsing scheduling a style recalc / invaliding layout - 43.5% were <= 1ms Reloading cnn.com there was: - >11900 ParseHTML records - Ranging from 0.00ms - 8.50ms - The longest being the 2nd record received! - 99.9% were <= 1ms Reloading apple.com there was: - 34 ParseHTML records - Ranging from 0.00ms - 2.39ms - Again the longest were the first few records received - 94% where <= 1ms As suspected, this is only really apparent in the case of the very very large document. For most pages, and certainly after initial page load, parse time becomes insignificant. The only advantage I can see to keeping these records is that it, when debugging page load we could account for a few ms of "Other" time in some frames for Rendering Frames timelines (as right now this is contributing to Other) but it is still a small chunk. (In reply to comment #7) > I'm pretty sure these ParseHTML records will always be small, given how the > parser handles incoming data in small chunks from the network. It also > starts and stops as it hits <script> and <style> tags. Yep, that appears to be the case. -- I vote dropping it, I'll put up a patch.
Joseph Pecoraro
Comment 9 2015-11-03 11:30:41 PST
> I vote dropping it, I'll put up a patch. Looking at other browsers: - Firefox doesn't appear to have this kind of information - Chrome includes it in their Timeline - Waterfall you can see which events were triggered by parsing (send requests, evaluate script) - Same in the Flame Chart view. I think that information could be pretty useful even if it may be obvious in most cases. We may want to add this back later as we improve visualization of timeline data.
Joseph Pecoraro
Comment 10 2015-11-03 11:34:50 PST
Created attachment 264704 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 11 2015-11-03 11:37:15 PST
Attachment 264704 [details] did not pass style-queue: ERROR: Source/WebCore/html/parser/HTMLDocumentParser.cpp:36: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Joseph Pecoraro
Comment 12 2015-11-03 11:38:59 PST
Created attachment 264705 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 13 2015-11-03 12:28:28 PST
Comment on attachment 264705 [details] [PATCH] Proposed Fix Clearing flags on attachment: 264705 Committed r191967: <http://trac.webkit.org/changeset/191967>
WebKit Commit Bot
Comment 14 2015-11-03 12:28:33 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.