ANP-Granular / ParticleTracking

Library and GUI for tracking (rod-like) particles on camera images in 2D and 3D
https://particletracking.readthedocs.io/en/latest/
GNU General Public License v3.0
2 stars 2 forks source link

Slow color & view switching #20

Closed a-niem closed 3 years ago

a-niem commented 3 years ago

Switching of the rod color or the camera view becomes very slow when corrections have been made to the rod data. The switching then takes ~1-2 sec. This happens because the application writes the changes to a file on disk and blocks during that period. It was coded this way to:

  1. avoid RAM usage by only having the contents of one data file loaded at a time and immediatly release that again after the relevant data was extracted.
  2. avoid reading attempts to a file that is currently being written to.

This is specifically a problem when trying to track one rod across two views and/or multiple frames as the waiting period then would be a big percentage of the total work time. When trying to correct the positions of all rods in one image before one of the switching operations occurs, this waiting time is only an insignificant portion of the total work time and might therefore not be an issue.

@adithyaOvGu, @messyblanket Do you find this "laggy" behavior disturbing during your correction/tracking work and do you want it fixed at the expense of a bit more RAM usage?

messyblanket commented 3 years ago

no. (In another angle it's a nice feature)

a-niem commented 3 years ago

Is resolved with PR #19.