Infinite scroll keeps recalculating style (in both v1 and v2)
See original GitHub issueWhat happened?
Infinite scroll keeps recalculating style, thus keeping the CPU busy (constantly between 6-10%).
The element’s stop
method stops this from occurring and resume
method makes it happen again.
What did you expect to happen?
Once the page is loaded, don’t use CPU anymore. There shouldn’t really be a need to endlessly do the same operations
Reproduction URL
https://quasar.dev/vue-components/infinite-scroll
How to reproduce?
- Go to https://quasar.dev/vue-components/infinite-scroll
- Open Task Manager
- Note that the Chrome tab for the Infinite Scroll page is constantly using CPU
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Components (quasar)
Platforms/Browsers
Firefox, Chrome, Other
Quasar info output
No response
Relevant log output
No response
Additional context
I’ve only tested in Chrome (Version 108.0.5359.98) and Firefox (107.0.1 (64-bit)), there might be other browsers where this is failing. Using Windows 10 Pro (Version 10.0.19045 Build 19045)
Issue Analytics
- State:
- Created 9 months ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Actions · quasarframework/quasar - GitHub
Infinite scroll keeps recalculating style (in both v1 and v2) Process Created Issue #625: Issue #15094 opened by krispern. last week 22s. last...
Read more >how can I determine the cause of a "Recalculate Style" log ...
I'm almost sure you have some infinite repeating animation on your page. That's what caused Recalculate Style without saying what caused it.
Read more >ThemeNectar | Changelogs - Salient
Updated Salient Core plugin to v1.9.6; Updated Salient Shortcodes plugin ... Easily access and edit elements in a tree-style view; Scroll to ...
Read more >Infinite scroll techniques in React - LogRocket Blog
Infinite scrolling technically requires adding a scroll event listener to the window object or a certain div. This determines when the scroll ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fix will be available in Quasar v2.10.3 and v1.22.3
I added the css to the global css file now. Looking at the element, it seems the styles are even applied. Unfortunately, that doesn’t change anything as the animation/style calculation/CPU use is still continuing.
If there’s a fix coming out soon, I can wait for that.