-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
noContent > * selector slows down initialization #655
Comments
Oh, and i just noticed, when switching back to version 2.7.2, which we currently use in production, i cannot find these blocking " Update: Found them, but they are in another place in the profiling. They also seem to be way faster. They seem to all affect 0 elements, while the blocking parts in the original post affect ~1300 elements (in my tests, probably depends on the number of children in the ScrollContainer) |
good day @heikomat :) I see.. short explanation why this selector is needed and what it does:
As you probably already figured out, this doesn't really affect the functionality of your app, because you're probably only using the default scroll direction. Because the coordinates will always fallback to the default scroll direction your app will also continue to work even without the style. So for you this whole detection brings 0 benefit and only makes the update cycle slower. This detection is already cached and optimized in how many times it runs, but is must always run at least once (thats why you mostly will only feel the performance impatc on the initialization) or when updating with I'm having a few ideas of how to improve this:
Do you have any thoughts or preferences of how to solve this problem? |
An option to hint the scroll-direction would definitely work for me and sounds like a simple enough solution. Only thing i find strange is, that the problem doesn't seem to exist in 2.7? or maybe i'm just not seeing it in the profiling. |
@heikomat that make sense since this feature with the non-default scroll-direction was added in I still need to think about this a little bit, since a separate option could be hard to explain / discover for not experienced users.. this problem should be fixed in the next release though |
I understand. Take your time and thanks a lot! :) |
@heikomat I've just released Please try it out and give feedback :) |
@KingSora thanks! |
@heikomat I really appreciate the work you put into the tests and comparisons between versions. It really helps me to improve the quality / performance of the plugin. I'm glad the new version solved this specific issue. Please feel free to open as many bug / improvement issues as you want, I'll try to follow up on every single one :) |
Describe the bug
In my react application, i have some OverlayScrollbars.
It seems like this selector (only the one with
> *
) about doubles the time it takes to initialize the scrollbars:OverlayScrollbars/packages/overlayscrollbars/src/styles/structure.scss
Line 145 in d33ea86
I noticed that this selector was checked a lot, but never actually matched (in my case) when trying out chromes new
enable css selector stats
-optionTo Reproduce
Expected behavior
I would like the scrollbar initialization to be as fast as possible
Examples
I'm currently at work and don't have time to create a working sandbox. Sorry :(
I hope the info i collected is sufficient
Environment
The text was updated successfully, but these errors were encountered: