Hi there,
I wanted to share here a thinking about possible sub-optimal loading of data in stone of orthanc,
My observation is the following :
- By Initializing Stone at the patient level Orthanc start to fetch each series metadata sequentially one by one
- the series /metadata API is long to process because of the need to access each instance in the storage endpoint of Orthanc. In my scenario the /metadata API at series level require 6 to 10 seconds.
- One weird thing : If you ask to display a series before stone has received the metadata, there is an infinite waiting spinner, the images are not display when the response is received. One metadata is received (shown with the slice count appearing in the thumbnail) you have to re-drag and drop to be able to see images.
- In the case of querying a patient level with a lot of studies, the preloading mechanism call a lot of time consuming API while the physician will certainly not going to analyze all of them. Also in terms of back-end workload it seems sub-optimal as the /metadata API will require a instance access and each /instance call to load the slices will call to another instance access on the storage access of the same files.
So I may open several question / issues, I don't expect an immediate solution but maybe some idea to think for a roadmap of Stone enhancements,
-> Is it possible when a series is requested to force the /metadata API call and then display images at received response (to avoid this infinite spinner)
-> Is there a way to reduce the call to /metadata API ?
The preloading mechanism is interesting but maybe should be more customizable to not put to much pressure on the backend when multiple studies are available (maybe starting by choosing in the option if we should preload or not).
-> What is the reason the /metadata of all instances are called before the /instances APIs ? OHIF made the same choice, so I bet there is a reason but can't figure why. Why this methods in preferred rather then progressively loading the metadata with the /instances calls ?
If this dual scenario /metadata then /instances is needed, is there a way to imagine avoiding dual access to the storage backend ? Maybe caching the /metadata answer somewhere ?
Best regards,
SAlim