-
Notifications
You must be signed in to change notification settings - Fork 30
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
Confine projections to no more than 256MiB of raw data #115
Conversation
The size limit |
@jburel: Agreed. I would have pursued that but it's 3+ PRs to do. Shall we get this in and I can follow up with those changes and we can decide if this should actually be enforced at the rendering engine level as well? Since we're using the microservices predominantly it's less of an issue for us and adding a check there is very easy. |
I will do some functional testing this am |
Sure, I should be able to start the work on it next week and we can decide on when we want to get it in and how. |
Discussed with @chris-allan, |
merging |
idr0077 (currently importing) has some images 1920 x 1920 x 285 or more and I can see users wanting to play a movie of the projection as at https://twitter.com/karlriha/status/1227154739198033920, but this PR won't be in that release I guess. |
Apologies for not looking closer at the code before, but I noticed that the active channel counting only happens when you first launch the viewer (not when you turn channels on/off). To fix it properly, we'd need to check for disabling the projection when channels turn on/off. |
The safest at this stage will be to check the number of channels regardless of the number of active channels |
I can definitely open a follow up PR that switches the checks from the number of active channels to the total number of channels; that would err on the side of caution. |
Follow up is in #130. /cc @jburel, @will-moore |
What this PR does
Projections from the OMERO.web default viewer are currently not confined. In 2019 the stack sizes across all active channels can easily be 1-2 GiB which will, on a reasonable machine, result in projection times > minute. The stack size can also be > Java maxint which will result in integer overflows and HTTP 500s.
This PR confines the maximum projection size as 256MiB of raw data, disabling the "Maximum Intensity" viewing option of the viewer if this condition is met.
Testing this PR
Find an image where the projection size as defined as
sizeX * sizeY * sizeZ * activeChannelCount * bytesPerPixel
is greater than 256MiB as well as one that is notOpen the viewer
Ensure that the "Maximum Intensity" viewing option is disabled or enabled accordingly