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

Blur backdrop filter on navbar noticeably impacts scroll performance #1049

Closed
3 tasks done
vberlier opened this issue Jul 23, 2022 · 2 comments · Fixed by #1790
Closed
3 tasks done

Blur backdrop filter on navbar noticeably impacts scroll performance #1049

vberlier opened this issue Jul 23, 2022 · 2 comments · Fixed by #1790
Assignees
Labels
enhancement New feature or request theme Related to the theme
Milestone

Comments

@vberlier
Copy link

Describe the bug

The blurred background on the navbar looks nice but I noticed that it causes some lag when scrolling. I used the "Rendering" tab in the chrome devtools to measure the actual impact on performance and it looks like disabling the backdrop-filter property in the inspector improves the framerate by almost 30%.

This is a common problem that plagues the "frosted background" trend. If the content behind an element with a blurred backdrop updates rapidly (such as when scrolling), the page will start to stutter. This is even more noticeable on 4k displays where the blur filter has to process a lot more pixels.

image

backdrop-filter enabled backdrop-filter disabled
image image

Reproduction

To gather the above metrics I opened the official vitepress website and held the down arrow key to scroll continuously for a few seconds. For testing without the blur effect I disabled the backdrop-filter property on the VPNavBar component in the inspector.

Expected behavior

This could be solved by removing the blur effect or only enabling it at low dpi using a media query. Another option would be to make it easy to disable the blur effect when extending the default theme.

System Info

Chrome 103, Windows

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@vberlier vberlier added the bug: pending triage Maybe a bug, waiting for confirmation label Jul 23, 2022
@gmqiyue
Copy link

gmqiyue commented Aug 18, 2022

has same problem on macos12.5/chrome 106

@kiaking kiaking added enhancement New feature or request theme Related to the theme and removed bug: pending triage Maybe a bug, waiting for confirmation labels Jan 13, 2023
@kiaking kiaking added this to the v1.0.0 milestone Jan 13, 2023
@kiaking
Copy link
Member

kiaking commented Jan 13, 2023

I've removed blur background due to design finalization at #1790.

@kiaking kiaking self-assigned this Jan 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request theme Related to the theme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants