Bug 221596 - Reduce the overhead of HTMLDocumentParser in innerHTML setter
Summary: Reduce the overhead of HTMLDocumentParser in innerHTML setter
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-09 00:23 PST by Ryosuke Niwa
Modified: 2021-02-09 17:18 PST (History)
10 users (show)

See Also:


Attachments
WIP (3.98 KB, patch)
2021-02-09 00:23 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch (6.09 KB, patch)
2021-02-09 15:36 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch (6.15 KB, patch)
2021-02-09 15:37 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch for landing (6.15 KB, patch)
2021-02-09 15:49 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2021-02-09 00:23:11 PST
There is a bunch of overhead in running the full HTMLDocumentParser.
We should add some fast paths to speed things up for innerHTML.
Comment 1 Ryosuke Niwa 2021-02-09 00:23:53 PST
Created attachment 419683 [details]
WIP
Comment 2 Ryosuke Niwa 2021-02-09 15:36:20 PST
Created attachment 419775 [details]
Patch
Comment 3 Ryosuke Niwa 2021-02-09 15:37:33 PST
Created attachment 419776 [details]
Patch
Comment 4 Simon Fraser (smfr) 2021-02-09 15:40:14 PST
Comment on attachment 419776 [details]
Patch

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

> Source/WebCore/html/parser/HTMLDocumentParser.cpp:519
> +        // HTMLTreeBuilder may have a parser blokcing script element but we ignore them during fragment parsing.

blokcing
Comment 5 Ryosuke Niwa 2021-02-09 15:47:45 PST
(In reply to Simon Fraser (smfr) from comment #4)
> Comment on attachment 419776 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=419776&action=review
> 
> > Source/WebCore/html/parser/HTMLDocumentParser.cpp:519
> > +        // HTMLTreeBuilder may have a parser blokcing script element but we ignore them during fragment parsing.
> 
> blokcing

Fixed.
Comment 6 Ryosuke Niwa 2021-02-09 15:49:14 PST
Created attachment 419778 [details]
Patch for landing
Comment 7 EWS 2021-02-09 16:38:21 PST
Committed r272622: <https://commits.webkit.org/r272622>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 419778 [details].
Comment 8 Radar WebKit Bug Importer 2021-02-09 17:18:53 PST
<rdar://problem/74167433>