Bug 262097 - REGRESSION (iOS 17): 100x performance degradation of Range.setStart() after repeating DOM operation.
Summary: REGRESSION (iOS 17): 100x performance degradation of Range.setStart() after r...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 17
Hardware: iPhone / iPad iOS 17
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-09-25 22:19 PDT by Takao Baba
Modified: 2023-09-26 18:18 PDT (History)
5 users (show)

See Also:


Attachments
testcase (3.34 KB, text/html)
2023-09-25 22:19 PDT, Takao Baba
no flags Details
result (184.92 KB, image/png)
2023-09-25 22:20 PDT, Takao Baba
no flags Details
result movie on iPhone 13 (1.50 MB, video/quicktime)
2023-09-26 18:18 PDT, Takao Baba
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Takao Baba 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.
Comment 1 Takao Baba 2023-09-25 22:20:08 PDT
Created attachment 467869 [details]
result
Comment 2 Radar WebKit Bug Importer 2023-09-26 09:28:30 PDT
<rdar://problem/116059496>
Comment 3 Alexey Proskuryakov 2023-09-26 11:27:06 PDT
Thank you for the report. FWIW, I cannot reproduce this on an iPhone.
Comment 4 Takao Baba 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
Comment 5 Takao Baba 2023-09-26 18:18:32 PDT
Created attachment 467886 [details]
result movie on iPhone 13