Bug 243123 - Thousands of window.onload events makes Safari hang and page loading slower than other browsers
Summary: Thousands of window.onload events makes Safari hang and page loading slower t...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Nobody
URL: https://bug1542995.bmoattachments.org...
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-07-22 17:28 PDT by Ahmad Saleem
Modified: 2022-10-18 08:30 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-07-22 17:28:47 PDT
Hi Team,

Thanks for doing good job, while trying to find how other browsers work for window.onload, I came across following test case in Mozilla Bugzilla:

Link - https://bug1542995.bmoattachments.org/attachment.cgi?id=9056867

It causes Safari tab to hang and also it makes interacting with other tabs bit difficult for few seconds and then it also take longer than other browsers (Chrome Canary 105 and Firefox Nightly 104) to load it.

** Steps to Reproduce ***

1. Load Link
2. Notice the page loading speed

EXPECTED RESULT: Page Loading should not be slower than other browsers and it should not hang Safari even in slightest

ACTUAL RESULT: Page Loading is slower and it do hang Safari on few occasion but it does not lead to crash

Looking forward for this bug to get fixed.

Thanks in advance.
Comment 1 Karl Dubost 2022-07-25 00:18:50 PDT
Oh this is a bug I have created on Firefox, which came from a Webcompat issue.
https://bugzilla.mozilla.org/show_bug.cgi?id=1542995 (which should be closed probably)

The bug is based on a recursion limit.

On Firefox windows, the issue was fixed with a stack limit.
https://hg.mozilla.org/releases/mozilla-release/rev/c6f45f6f744d

And this one fixed it for other platforms.
https://bugzilla.mozilla.org/show_bug.cgi?id=1578350
Comment 2 Radar WebKit Bug Importer 2022-07-25 00:20:34 PDT
<rdar://problem/97536058>