mozilla::ContentEventHandler::GetTextLength takes lots of time in sp3 TipTap
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: smaug, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(1 file)
See the profiles, mozilla::ContentEventHandler::GetTextLength takes a lot of time.
https://speedometer-preview.netlify.app/?developerMode=&suites=Editor-TipTap
masayuki, would you have time to take a look at this?
Reporter | ||
Comment 1•2 years ago
|
||
Note, Editor-TipTap was recently updated, so that could have revealed this issue.
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=019009b60f0a846abbd67eaf40e39cdb5d774c9a&tochange=8ca41fa1fe7f665f3fb17e1ee1ecb9dc533e3970 seems to be the regression range after all
Comment 2•2 years ago
|
||
This is responsible for the entire performance gap to Chrome on this subtest and needs to be fixed.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 3•2 years ago
|
||
This is windows only right? It seems on macOS and Linux we don't do newline conversion shenanigans.
Reporter | ||
Comment 4•2 years ago
•
|
||
I believe this is Windows only.
At least on Android we're faster than release Chrome.
On Mac Nightly is slower than Chrome, but not as much as on Windows.
Assignee | ||
Comment 5•2 years ago
|
||
(Sorry, I'm still on sick leaves, hopefully I'll be able to take a look next week.)
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Oh, I misunderstood. This must be a long standing issue, not a regression of bug 1835353. But anyway, I'll take a look.
Assignee | ||
Comment 7•2 years ago
|
||
It seems that mState.mIs2b
check in nsTextFragment::CharAt
is not optimized from the for
loop in CountNewlinesInXPLength
.
Updated•2 years ago
|
Assignee | ||
Comment 8•2 years ago
|
||
TextFragment::CharAt()
considers whether it's in the 2b-mode or not in each
call in theory. Let's create dependent string for skipping the redundant
checks.
Depends on D180767
Comment 10•2 years ago
|
||
bugherder |
Description
•