-
Notifications
You must be signed in to change notification settings - Fork 24
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
Simple fix to speed up dataset gallery #3480
Conversation
Regarding reducing pressure on the backend: The thumbnails have been / should be cached. So this should not really affect the server much in a production setup. Maybe the caching in the backend is broken causing the long loading times in the first place? |
Could very well be, but still, requesting ~266 thumbnails (on master), each around 200kb in size is not really necessary, let's save some bandwidth :) I think most of the times, this view is opened to search through the existing datasets (which is still possible) or by accident or because it's the default tab. |
Yes, sure. I did not want to discredit your PR, just in addition this is something we should check. |
I fully agree with you :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent fix 👍 Very elegant and effective!
Cool stuff, thanks! |
@fm3 Thanks for checking! |
* origin/master: Optimize performance for the list request /api/datasets (#3441) add annotation dataset foreign key (#3482) thumbnails: correctly use zoom value if specified (#3487) Store Meshes in Postgres (#3367) fix alpha return (#3483) Added script to apply all new evolutions (#3427) Simple fix to speed up dataset gallery (#3480) better errors for screenshot tests, fix imports, refresh screenshots (#3479) (Backend only) Add project priority to progress report json (#3476) Handle missing write access on datastore (#3411) Re-introduce "Flightmode improvements"" (#3473) Circleci-notify: linkify PR number (#3469) Revert "Flightmode improvements" (#3472) also flow-ignore binaryData when using symlinks (#3471) Flightmode improvements (#3392) Circleci custom notification (#3465) enable /api/switch cross-organization (#3464)
This is a very simple proposal to speed up the dataset gallery page for instances with a single organization. Previously in that case, all datasets (and their thumbnails) were shown and we thought about implementing pagination and/or viewport dependent rendering.
Now, when loading the page only the first 6 datasets are shown. A "Show more" link can be clicked to show all datasets (same as in the multiple-organizations-case, as on demo.webknossos).
I would argue that this alone will result in a decrease in server load as in most cases not all thumbnails are loaded. The search box still searches through all datasets and works as before.
If users complain about having to click that button or are doing it very often, we can always implement viewport dependent rendering later, I'd say :)
/cc @fm3
URL of deployed dev instance (used for testing):
Steps to test:
Issues: