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

When the body page length is too large, the console will issue a performance warning #703

Open
xiyuvi opened this issue Jan 13, 2025 · 4 comments

Comments

@xiyuvi
Copy link

xiyuvi commented Jan 13, 2025

Is your feature request related to a problem? Please describe.
When the body page length is too large, the console will issue a performance warning,For example, on pages that are relatively long https://kingsora.github.io/OverlayScrollbars/ Central, console warning: [Violation] Forced reflow while executing JavaScript took 162ms
And on shorter pages https://kingsora.github.io/OverlayScrollbars/example/overlayscrollbars/ There is no such performance warning
The shorter the test page or the fewer sub elements on the page, the lower the ms value of this performance alarm

Describe the solution you'd like
I hope there is a way to solve this performance alarm

Describe alternatives you've considered
I tried calling the requestAnimationFrame function on the outer wrapper of OverlayScrollbars, but was unsuccessful. I received an additional warning: [Violation] 'requestAnimationFrame' handler took 62ms

Additional context
image
image

@KingSora
Copy link
Owner

KingSora commented Jan 13, 2025

Good day @xiyuvi :)

Hmm I've never observed that warning in the console until now.. What OS / Browser / Browser version are you using?

@xiyuvi
Copy link
Author

xiyuvi commented Jan 14, 2025

@KingSora
This is the method I found online to display performance warnings. It is likely that redrawing caused this warning. If you find that optimization is not possible, you can directly end this issue. Thank you for your hard work

Chrome 131.0.6778.265
Update: Chrome 58+ hid these and other debug messages by default. To display them click the arrow next to 'Info' and select 'Verbose'.

Chrome 57 turned on 'hide violations' by default. To turn them back on you need to enable filters and uncheck the 'hide violations' box.

image
https://stackoverflow.com/questions/41218507/violation-long-running-javascript-task-took-xx-ms

@cavidev
Copy link

cavidev commented Jan 29, 2025

Hey! I found the same issue... Would you happen to have any updated information about it? It looks like it does not affect the functionality, I uncheck the verbose option in the Chrome Browser.

Image

@dannybeckett
Copy link

Just a thought: What specification is your hardware? Do you have limited CPU & RAM resources?

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

No branches or pull requests

4 participants