Skip to content

Fix javascript performance issue#15

Merged
CyrilJl merged 1 commit into
mainfrom
fix-js-performance
Aug 28, 2025
Merged

Fix javascript performance issue#15
CyrilJl merged 1 commit into
mainfrom
fix-js-performance

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

This change fixes a performance issue in the status.js script that was causing the page to freeze. The checkUrls function is updated to process URLs in chunks with a delay, preventing the browser from being overwhelmed by a large number of concurrent requests.

The previous implementation of `checkUrls` would fetch all URLs at once using `Promise.all`. This caused performance issues when the number of URLs was large, leading to the page freezing.

This commit refactors `checkUrls` to process URLs in chunks of 10, with a 100ms delay between each chunk. This prevents the browser from being overwhelmed by a large number of concurrent requests, and fixes the performance issue without changing the behavior of the page.
@CyrilJl CyrilJl marked this pull request as ready for review August 28, 2025 21:34
@CyrilJl CyrilJl merged commit 3068ebd into main Aug 28, 2025
1 of 2 checks passed
@CyrilJl CyrilJl deleted the fix-js-performance branch October 21, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant