Bug 262097

Summary: REGRESSION (iOS 17): 100x performance degradation of Range.setStart() after repeating DOM operation.
Product: WebKit Reporter: Takao Baba <baba>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: cdumez, megan_gardner, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: iPhone / iPad   
OS: iOS 17   
Attachments:
Description Flags
testcase
none
result
none
result movie on iPhone 13 none

Takao Baba
Reported 2023-09-25 22:19:44 PDT
Created attachment 467868 [details] testcase # Steps to reproduce 1. Open attached sample.html 2. Wait tens of seconds. # Expected behavior The processing time shown in "h1" tag is stable, about 20-100ms. # Actual behavior On iOS 17 Safari, the processing time is going to be about 10-100 times slower (about 1000-5000ms), after about 20 seconds. The performance is good in first few seconds. # Note The sample repeats creating a range, modifying the DOM and revert them many times. According to the inspector, "Range.setStart()" in "releaseRange()" takes long time. The issue does not occur on iOS 16.2 and Safari Technology Preview 17.0 on macOS.
Attachments
testcase (3.34 KB, text/html)
2023-09-25 22:19 PDT, Takao Baba
no flags
result (184.92 KB, image/png)
2023-09-25 22:20 PDT, Takao Baba
no flags
result movie on iPhone 13 (1.50 MB, video/quicktime)
2023-09-26 18:18 PDT, Takao Baba
no flags
Takao Baba
Comment 1 2023-09-25 22:20:08 PDT
Radar WebKit Bug Importer
Comment 2 2023-09-26 09:28:30 PDT
Alexey Proskuryakov
Comment 3 2023-09-26 11:27:06 PDT
Thank you for the report. FWIW, I cannot reproduce this on an iPhone.
Takao Baba
Comment 4 2023-09-26 18:15:44 PDT
Thank you for the confirmation. In my company, the issue is able to reproduce at least the following environment. - iPhone SE2 iOS 17.0.2 - iPhone 13 iOS 17.0.1 - iPad 9th iPadOS 17.0 - iPad Simulator iPadOS 17.0 on M1 mac mini
Takao Baba
Comment 5 2023-09-26 18:18:32 PDT
Created attachment 467886 [details] result movie on iPhone 13
Note You need to log in before you can comment on or make changes to this bug.