-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Repository] Improve "Cache usage statistics" table #42
Comments
I started working on this, but I have some readability and perf issues. I'm making each line collapsible, and I want to start everything collapsed. but on big repos, this takes up to 500ms during the init phase. Maybe you could have a look at it? (https://github.com/troussej/BetterDynAdmin/tree/repository/cache_stats ) |
I just take a look, in toggleCacheLines you are using JQuery slideToggle which perform an animation to hide the element. Since you are using this function to handle click on the arrow and also to toggle off all lines at initialization time, you are performing X slide animations (X = number of item descriptor) Default duration for the animation is 400ms, I'm surprised it doesn't take more time to render ! May be there is some JQuery or browser optimization to run several animation at the same time. Anyway, I replaced .slideToggle() with .toggle(), for a repository with 60 item descriptors, it took 705 ms with slideToggle() and 140 ms with toggle(). I tried slideToggle(0), but it's the same as slideToggle(). May be you can add a boolean parameter to toggleCacheLines to know if you want to trigger the slide animation or not and use toggle and slideToggle accordingly. |
looks like setting up a sticky header is pretty tricky, I've seen plugins over 300 lines to do that ... |
i think this can be closed for now. |
The text was updated successfully, but these errors were encountered: