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

Img data json django32 #537

Closed
wants to merge 14 commits into from
Closed

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Feb 25, 2024

This is identical to #536, except this is based off v5.22.1 and so is compatible with Django 3.2.

Performance testing

NB: this PR includes TEMP A/B testing

  • A) Images with EVEN numbered IDs: - we check the size of the image and only load rendering engine for resolution levels if it's BIG
  • B) images with ODD numbered IDs - we ALWAYS load the rendering engine to check re.requiresPixelsPyramid(), if so, we also load resolution levels.

I would expect A (EVEN numbers) to be faster for small images BUT it seems that B is faster?!?! Possibly because the size threshold is using config service to get the BIG image limit.

Memo file requirement

I had hoped that by checking image size, small images (EVEN IDs) would NOT need to read memo file in order to load imgData (required for iviewer right panel).

BUT, seems that the imgData won't load for e.g. idr0090 images where memo file is missing. e.g. https://idr-testing.openmicroscopy.org/webclient/imgData/12542998/ (504 timeout).

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#468. See the console output for more details.
Possible conflicts:

--conflicts

rv["tiles"] = False
else:
if load_re(image, rv):
levels = image._re.getResolutionLevels()
Copy link
Member Author

Choose a reason for hiding this comment

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

NB: TEMP: only use the image.requiresPixelsPyramid() if image ID is an EVEN number.

@will-moore
Copy link
Member Author

Testing with this PR deployed on idr-testing definitely felt faster to load right panel of iviewer.
Closing now.

@will-moore will-moore reopened this Mar 18, 2024
@will-moore
Copy link
Member Author

will-moore commented Mar 18, 2024

Redeploying the A/B/C testing on idr-testing for more perf testing...

for server in omeroreadwrite omeroreadonly-1 omeroreadonly-2 omeroreadonly-3 omeroreadonly-4; do ssh $server "sudo /opt/omero/web/venv3/bin/pip uninstall -y omero-web && sudo /opt/omero/web/venv3/bin/pip install git+https://github.com/ome/omero-web.git@refs/pull/537/head && sudo service omero-web restart"; done

@will-moore
Copy link
Member Author

will-moore commented Mar 18, 2024

Summary of performance testing...

In the chart below, each green bar is the http response time. Blue (where shown - 1st 2 sections only) is the time to load rendering engine as reported in the JSON response with the ABC testing enabled for this PR.

Testing in 4 sessions below:

  • 1st session: idr0010 with this PR - A/B/C testing in a bit of random order
  • 2nd session: idr0090 with this PR - A/B/C testing in order - e.g. every 3rd image uses rendering engine (blue bars)
  • 3rd session: idr0090 without this PR - no A/B/C testing - all bars are the same
  • 4th session: idr0010 without this PR - no A/B/C testing - all bars are the same

Screenshot 2024-03-18 at 13 44 22

Conclusions:

  • For idr0010, this PR makes very little (no discernible) difference. Times to load rendering engine to get pyramid levels are about 0.04 secs. Probably about the same for other stateful services: insignificant compared to overall http response times of 0.5 secs
  • For idr0090, loading rendering engine to get pyramid levels takes about 0.5 seconds.
  • Even when we do load RE (for pyramid levels) in this PR, http response is about 1.4 secs, which is faster than without this PR (about 1.9 secs) suggesting that for idr0090, rawPixelsStore for pixels min/max and renderingEngine loading of rendering settings together add an extra 0.5 secs in total (for idr0090).

To summarise:

  • Don't expect this PR to improve performance for most data in OMERO
  • Even if we always use RenderingEngine to test/load the pyramid levels, this PR still has a performance improvement for large (slow) data like idr0090

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