Skip to content
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

feat: reduce layers numbers on low end devices #3235

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

Conversation

Cl0v1s
Copy link
Contributor

@Cl0v1s Cl0v1s commented Mar 15, 2025

A high number of layers can be problematic on mobile devices (causing stutters on scroll, or blinking). Creating a layer is not a straightforward operation, and many CSS rules and configurations can generate them.

With current configuration, we are creating more than 1 layer per text-only status on page (3 is the usual number, can go up to 6 or more when media is embedded)

One such rule is the will-change property. The will-change property helps the browser optimize page rendering by indicating which parts of the page are likely to change, prompting the browser to place these parts on their own layers.

While this is generally desirable, a high number of layers can slow down the browsing experience on low-end devices. Allowing the option to disable this property when the related setting is enabled can improve overall performance.

(You can view the generated layers using Chrome's Layer Developer Tool by toggling the "optimize for low-end device" option.)

Copy link

netlify bot commented Mar 15, 2025

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit f8ae946
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/67d5e85977164e00080ab1c0
😎 Deploy Preview https://deploy-preview-3235--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 15, 2025

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit f8ae946
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/67d5e859f2e2b800084a4972

@Cl0v1s Cl0v1s changed the title feat: optimize for low end device now reduce layer numbers by avoidin… feat: reduce layers numbers on low end devices Mar 15, 2025
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