I’m creating a pre-processing chain for SAR products based on snappy, using mainly a Terrain Correction operator.
Performance is poor compared to using SNAP or gpt from the shell. Obviously, the reason that calling the java method via jpy from python does not use multi-threading, at least in my case (Ubuntu 16.04 in a VM with 32 GB, python 3.4): During the execution of
the running script occupies only one (in this case: out of four) cores of the CPU. This is of course much slower than the same routine called from SNAP.
According to Performance of snap desktop and snappy however, it should: (perhaps):
the called java code should actually be executed multithreaded. at least for the GPF calls and the execution of operators. The number of threads is determined by the number of cores available.
I know that (C-)Python is a bit awkward regarding parallelism, but has anyone found a solution to this problem ? Calling gpt in a subprocess could be of course one, but not the most elegant, I would say.
Thanks in advance.