I’m looking at optimizing a Python Plug-in script that does sorting and pagination of tools/find results in python. I based my original script on some of the examples in the Orthanc Book, but it seems somewhat slow with a large dataset, mostly this one:
There is an example there for MetaData also, but I might be able to replace some of those by using the new Labels feature.
For starters, I was wondering if the API supports sorting itself. It seems not ??
and
/sds
P.S. I did a little benchmarking with that and it seems that the tools/find call itself is the main bottleneck. All of the other Python code that does the pagination and other processing (i.e. sorting and slicing) seems to take very little time. I suppose it has a bit to do with the MainDicomTags setup and other configurations. Also wondering if there are optimizations or other things to be done if I am using Postgres as a DB ? i.e. config, Docker vs. not. Docker bound folder for Postgres vs. a Docker volume, etc. Seems like it should be possible to speed that up a bit.