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

[Repository] Improve "Cache usage statistics" table #42

Closed
jc7447 opened this issue Feb 8, 2016 · 4 comments
Closed

[Repository] Improve "Cache usage statistics" table #42

jc7447 opened this issue Feb 8, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@jc7447
Copy link
Owner

jc7447 commented Feb 8, 2016

  • Use even/odd to distinct each line
  • Make the header sticky with the scrollbar
@jc7447 jc7447 added the Idea label Feb 8, 2016
@jc7447 jc7447 changed the title Improve "Cache usage statistics" table [Repository] Improve "Cache usage statistics" table Feb 8, 2016
@troussej
Copy link
Collaborator

troussej commented Apr 1, 2016

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 )

@jc7447
Copy link
Owner Author

jc7447 commented Apr 1, 2016

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.

troussej added a commit that referenced this issue Jul 29, 2016
@troussej
Copy link
Collaborator

  • changed the css so that it's more legible
  • collapse/expand per line

looks like setting up a sticky header is pretty tricky, I've seen plugins over 300 lines to do that ...

@troussej troussej self-assigned this Jul 29, 2016
@troussej
Copy link
Collaborator

i think this can be closed for now.

@jc7447 jc7447 added this to the v2 milestone Sep 13, 2016
@jc7447 jc7447 closed this as completed Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants