Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
StateManager.getScrollBarSize() fetches scrollbar-size lazily #2200
1. Why is this change necessary?
Calculating the Scrollbar-Size right at the pageload forces a reflow by the browser. To prevent this ~60ms js-block, we can fetch the scrollbar-size lazily.
2. What does this change do, exactly?
Change the private property
were changed to call this new function.
3. Describe each step to reproduce the issue or behaviour.
Use the Chrome DevTools to profile a shopware-shop. On pageload you will see a flamegraph like in the screenshot above.
4. Please link to the relevant issues (if any).
5. Which documentation changes (if any) need to be made because of this PR?
None, as the removed property was private.