Closed knabar closed 9 months ago
Looks good and makes sense.
We load some settings from the server for the session at https://github.com/ome/omero-web/blob/5457b2dcc8359869314ee0779e603f973201a959/omeroweb/decorators.py#L287 so this could be added there, or use the same approach elsewhere?
Performance of loading the right panel is also impacted by the Download menu, which checks the size of every selected Image (expensive if lots of images selected). My PR at https://github.com/ome/omero-web/pull/17 mitigates that by only loading the Download menu when the user clicks on it.
We could do the same for scripts menu (since it checks the sizes of every Image until it finds one with sizeC > 1
), although maybe not necessary at this point.
@will-moore
I changed the approach to what is done in https://github.com/ome/omero-web/blob/5457b2dcc8359869314ee0779e603f973201a959/omeroweb/decorators.py#L287 and am storing the retrieved scripts in the request session now.
If the list_scripts
or listFigureScripts
are called from outside omero-web
, the code should still function, as the request
argument is not required.
This is now being included in merge-ci build and tested there today - all looking good 👍
The right panel re-fetches all available scripts on every render, which can take a significant amount of time.
This PR adds a very simplistic cache to fetching the script names, still with the following shortcomings:
@mabruce