Closed
Bug 1845445
Opened 2 years ago
Closed 2 years ago
Make `ContentEventHandler::ShouldBreakLineBefore` stop using `IsAnyOfHTMLElements`
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P2)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
118 Branch
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [sp3])
Attachments
(1 file)
The call is with 30 params and it appears in the profile. Additionally, the call of do_QueryObject
also appears in the profile.
With using nsHTMLTags
, we can solve these performance issue with the cost of accessing the hash table.
Assignee | ||
Comment 1•2 years ago
|
||
It's expensive to call nsINode::IsAnyOfHTMLElements
with a lot of arguments
due to its recursive calls (in this case, called with 30 arguments).
Additionally, the unknown element check with do_QueryObject
is also expensive.
Once we get an nsHTMLTag
, we can use a switch
statement.
Note that I realized nsHTMLTag_small
is not defined only on Windows if
nsHTMLTags.h
is included after rpcndr.h
in the Windows SDK since there is
#define small char
In the header file. This patch includes the workaround for this issue.
Updated•2 years ago
|
Whiteboard: [sp3]
Updated•2 years ago
|
See Also: → https://mozilla-hub.atlassian.net/browse/SP3-484
Updated•2 years ago
|
Attachment #9345727 -
Attachment description: Bug 1845445 - Make `ContentEventHandler::ShouldBreakLineBefore` use `nsHTMLTag` instead of `nsINode::IsAnyOfHTMLElements` with a lot of params r=#dom-core → Bug 1845445 - Make `ContentEventHandler::ShouldBreakLineBefore` use `nsHTMLTag` instead of `nsINode::IsAnyOfHTMLElements` with a lot of params r=smaug!,#dom-core
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/25a29224e55d
Make `ContentEventHandler::ShouldBreakLineBefore` use `nsHTMLTag` instead of `nsINode::IsAnyOfHTMLElements` with a lot of params r=smaug
Comment 3•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox118:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•