| Summary: | Performance improvement for the word boundary finding algorithm (findNextWordFromIndex) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | karlcow, mmaxfield, rniwa, simon.fraser, webkit-bug-importer, wenson_hsieh, zalan |
| Priority: | P2 | Keywords: | InRadar, Performance |
| Version: | Safari 16 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://jsfiddle.net/1ucrpsq5/show | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=114088 | ||
|
Description
Ahmad Saleem
2023-09-04 14:23:29 PDT
This is indeed failing quite hard. Looks like we spend some time in nextWordFromIndex:forward 32.79 s 82.2% 0 s WebCore::jsDOMSelectionPrototypeFunction_modify(JSC::JSGlobalObject*, JSC::CallFrame*) 32.79 s 82.2% 0 s WebCore::DOMSelection::modify(WTF::String const&, WTF::String const&, WTF::String const&) 32.79 s 82.2% 0 s WebCore::FrameSelection::modify(WebCore::FrameSelection::EAlteration, WebCore::SelectionDirection, WebCore::TextGranularity, WebCore::EUserTriggered) 32.79 s 82.2% 0 s WebCore::FrameSelection::modifyExtendingForward(WebCore::TextGranularity) 32.79 s 82.2% 0 s WebCore::FrameSelection::nextWordPositionForPlatform(WebCore::VisiblePosition const&) 32.79 s 82.2% 0 s WebCore::nextWordPosition(WebCore::VisiblePosition const&) 32.79 s 82.2% 0 s WebCore::nextBoundary(WebCore::VisiblePosition const&, unsigned int (*)(WTF::StringView, unsigned int, WebCore::BoundarySearchContextAvailability, bool&)) 32.79 s 82.2% 0 s WebCore::forwardSearchForBoundaryWithTextIterator(WebCore::TextIterator&, WTF::Vector<char16_t, 1024ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&, unsigned int, unsigned int (*)(WTF::StringView, unsigned int, WebCore::BoundarySearchContextAvailability, bool&)) 29.34 s 73.6% 0 s WebCore::findNextWordFromIndex(WTF::StringView, int, bool) 27.03 s 67.8% 0 s -[NSAttributedString(NSAttributedStringUIFoundationAdditions) nextWordFromIndex:forward:] (changing component to editing) |