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

Remove webgateway cache #549

Merged
merged 5 commits into from
May 17, 2024
Merged

Conversation

knabar
Copy link
Member

@knabar knabar commented Apr 12, 2024

This PR removes the webgateway cache functionality for rendered images and refactors the tempfile functionality into its own new file.

The motivation behind removing the webgateway cache is the minimal performance improvements from having the cache versus the large overhead introduced with the required cache invalidation. Tasks like applying rendering settings to a large number of images takes much longer than needed due to cache invalidation.

omeroweb/webgateway/webgateway_tempfile.py Dismissed Show dismissed Hide dismissed
omeroweb/webgateway/webgateway_tempfile.py Dismissed Show dismissed Hide dismissed
omeroweb/webgateway/webgateway_tempfile.py Dismissed Show dismissed Hide dismissed
omeroweb/webgateway/webgateway_tempfile.py Dismissed Show dismissed Hide dismissed
omeroweb/webgateway/webgateway_tempfile.py Dismissed Show dismissed Hide dismissed
omeroweb/webgateway/webgateway_tempfile.py Dismissed Show dismissed Hide dismissed
omeroweb/webgateway/webgateway_tempfile.py Dismissed Show dismissed Hide dismissed
webgateway_tempfile.abort(fpath)
raise Http404
webgateway_cache.setOmeTiffImage(request, server_id, imgs[0], tiff_data)
webgateway_tempfile.abort(fpath)
Copy link
Member

Choose a reason for hiding this comment

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

not sure that this line does anything now?

Copy link
Member

Choose a reason for hiding this comment

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

Ah - I missed the unchanged fpath, rpath, fobj = webgateway_tempfile.new(...) above, which makes more sense and explains .abort()

@will-moore
Copy link
Member

Good to clean up this unused code. Changes look good.

@knabar knabar marked this pull request as ready for review April 16, 2024 12:38
@knabar knabar added this to the 5.26.0 milestone May 7, 2024
Copy link
Member

@will-moore will-moore left a comment

Choose a reason for hiding this comment

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

This was included in the merge-ci deployment today - tested all the various rendering methods in viewers, thumbnails, plate JSON etc all working fine. Copy, Paste and Saving of rendering settings also tested. 👍

@knabar knabar merged commit 4f5c775 into ome:master May 17, 2024
10 checks passed
@knabar knabar deleted the feature-remove-webgateway-cache branch May 21, 2024 10:13
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.

3 participants