-
Notifications
You must be signed in to change notification settings - Fork 491
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
IQSS/9506 thumbnail failure tracking and other performance improvements #9669
IQSS/9506 thumbnail failure tracking and other performance improvements #9669
Conversation
Thank you so much @qqmyers for implementing it, this will solve the slow page load issue for us and anyone using custom S3 endpoints. |
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.
Looks good. thanks for the updates.
This matches previewimageavailable, also in dvobject. Plus it's clear we aren't talking about shaving. :)
This should have been part of 4ad06ba.
src/main/java/edu/harvard/iq/dataverse/search/SearchIncludeFragment.java
Show resolved
Hide resolved
FWIW: QDR generates a 400px version here and then uses styling to fit the page. Not sure what the motivation for that was without digging.
There are merge conflicts and the SQL script needs to be bumped. |
IQSS/9506-thumbnail-tracking
Conflicts (easy, just "add both"): doc/sphinx-guides/source/api/changelog.rst doc/sphinx-guides/source/api/native-api.rst src/main/java/edu/harvard/iq/dataverse/api/Admin.java
Found a regression, which Jim fixed (thank you!). I confirmed that I can still generate thumbnails for images and PDFs. For PDFs I had to install ImageMagick. See also this issue: |
What this PR does / why we need it: This PR makes several changes to improve the performance of thumbnail generation and retrieval, covering the issue #9506 (also reported via QDR) and the issue raised by Bikramjit Singh/Borealis when using relatively slow S3 storage (email between Borealis and @scolapasta, @pdurbin and @qqmyers ) and additional issues discovered while investigating:
previewshavefailedpreviewimagefail flag that is set the first time an attempt to create a thumbnail for a given file fails which is then used to avoid retrying the thumbnail creation process every time a thumbnail is requested (or isThumbnailAvailable() was called). Adds api calls to reset this flag globally or per file (to allow retrying)Which issue(s) this PR closes:
Special notes for your reviewer:
This PR doesn't completely remove using a base64 encoded thumb URL, e.g. on the dataset and file page where one base64 image is displayed. Once could also remove it in that case, but the performance issues related to base64 generation are primarily when many images have to be created before a page can be rendered.
This may also be useful for the SPA?
Suggestions on how to test this: Assure that thumbnails appear for image/pdf files as before (regression), that initial page load is faster/DV server is not making multiple S3 calls from the server to render initial root collection page, that files where thumbnail generation fails get marked with the previewshavefailed flag and subsequent accesses don't attempt to recreate the thumbnail, that using the api call to reset the flag for a/all files results in a new attempt to create a thumbnail.
Does this PR introduce a user interface change? If mockups are available, please link/include them here: thumbnails on the main page now load ~asynchronously (versus the page not loading at all until all thumbs are available).
Is there a release notes update needed for this change?:
Additional documentation: admin API docs