Skip to content

Centralize media match checks #13839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WebX47
Copy link

@WebX47 WebX47 commented Jun 25, 2025

WHY are these changes introduced?
Fixes #13788

WHAT is this pull request doing?
This PR fixes #13788 by introducing a caching mechanism for getLiveMatches.
Safari exhibited severe performance issues due to repeated calls to window.matchMedia. This change avoids re-computing media query matches by caching the result, improving performance and reducing unnecessary layout calculations.

🎩 checklist
☑️ Tested on multiple browsers and few public apps.
☑️ Tested screen resize events on all browser as well and everything worked as it should on resize as well.

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.

Poor polrais performance in safari
1 participant