Bug 238074 - Optimize AtomHTMLToken::initializeAttributes()
Summary: Optimize AtomHTMLToken::initializeAttributes()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-18 07:28 PDT by Chris Dumez
Modified: 2022-03-18 17:21 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.03 KB, patch)
2022-03-18 07:30 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.07 KB, patch)
2022-03-18 10:17 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2022-03-18 07:28:32 PDT
Optimize AtomHTMLToken::initializeAttributes().
Comment 1 Chris Dumez 2022-03-18 07:30:47 PDT
Created attachment 455093 [details]
Patch
Comment 2 Geoffrey Garen 2022-03-18 08:42:47 PDT
Comment on attachment 455093 [details]
Patch

R=me
Comment 3 Geoffrey Garen 2022-03-18 10:14:24 PDT
Comment on attachment 455093 [details]
Patch

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

> Source/WebCore/html/parser/AtomHTMLToken.h:207
> +    HashSet<AtomString> addedAttributes;

Maybe reserveInitialCapacity(size) here, like we do for m_attributes?
Comment 4 Chris Dumez 2022-03-18 10:17:11 PDT
Created attachment 455107 [details]
Patch
Comment 5 EWS 2022-03-18 17:20:40 PDT
Committed r291508 (248615@main): <https://commits.webkit.org/248615@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455107 [details].
Comment 6 Radar WebKit Bug Importer 2022-03-18 17:21:18 PDT
<rdar://problem/90511727>