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

Speed up item list annotation counts. #454

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

manthey
Copy link
Member

@manthey manthey commented Jun 5, 2020

When we show an item list in Girder with annotations, we show a badge on each thumbnail indicating how many annotations are on that large image. Before, this made one REST request per call without any sort of throttling, which could effectively block navigation until enough of the calls were resolved. This gets all needed values in a single REST request.

When we show an item list in Girder with annotations, we show a badge on
each thumbnail indicating how many annotations are on that large image.
Before, this made one REST request per call without any sort of
throttling, which could effectively block navigation until enough of the
calls were resolved.  This gets all needed values in a single REST
request.
@manthey manthey requested a review from BryonLewis June 5, 2020 17:00
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works much better when swapping between pages. One minor thing which may be partly my fault, I noticed that both the top static breadcrumb header and the annotations themselves are z-index:10 (I've should of given more room when I specified, didn't think about plugins modifying) so the badges scroll on top of the header. Let me know best course of action (I'm assuming it would be to push the girder header z-index out further to give more room for plugins and other items to mess with the z-index)

@manthey
Copy link
Member Author

manthey commented Jun 8, 2020

Looks good and works much better when swapping between pages. One minor thing which may be partly my fault, I noticed that both the top static breadcrumb header and the annotations themselves are z-index:10 (I've should of given more room when I specified, didn't think about plugins modifying) so the badges scroll on top of the header. Let me know best course of action (I'm assuming it would be to push the girder header z-index out further to give more room for plugins and other items to mess with the z-index)

There are two ways to fix this. One is to increase the header's z-index. The drawback is you have to know how much room the items need. I think the better way would be to make the .g-folder-list-container and .g-item-list-container have their own stacking contexts (e.g., add position: relative and z-index: 0 to each of those classes). Then, item and folder entries could have any z-index they need to.

Would you can to make a Girder PR with such a change, or shall I do it?

@BryonLewis
Copy link

BryonLewis commented Jun 8, 2020

Would you can to make a Girder PR with such a change, or shall I do it?

I can do it, I just may not get to it today.

Copy link

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and I'll work on the girder PR to fix the badges.

@manthey
Copy link
Member Author

manthey commented Jun 8, 2020

Thanks.

@manthey manthey merged commit ef57a5a into master Jun 8, 2020
@manthey manthey deleted the more-efficient-annotation-counts branch June 8, 2020 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants