cbassa / stvid

Satellite tracking with video cameras
GNU General Public License v3.0
70 stars 13 forks source link

Implements parallel processing of satobs #56

Closed interplanetarychris closed 4 years ago

interplanetarychris commented 4 years ago

Where multiple processors are available.

About 2x faster on a 2-core system, and 3-4x faster on an 8-core system A balance between regular user feedback and maximum usage of CPUs results in less-than-fastest possible performance.

For fastest performance, increase chunk size to a value larger than cpu_count. (Perhaps make this a parameter?)

Currently uses os.cpu_count() to determine number of threads available, which may be "too much" in some circumstances. Rather than make a dependency on psutil, it might be better to create configuration options for number of threads, and batch size in a future update.

process.py

astrometry.py

extract.py

satellite.py

stars.py

cbassa commented 4 years ago

Great work on parallelizing this part of the code! Making the processing steps thread safe is going to be very useful. We should probably have a discussion with @ppapadeas on modularizing the processing steps, as this is also something I have been thinking about. In that sense it could be an option to parallelize over tasks instead of input files; i.e. one thread for astrometry, one thread for computing predictions, etc.