gentlepumpkin / bi-aidetection

Alarm system for Blue Iris based on Artificial Intellience.
https://ipcamtalk.com/threads/tool-tutorial-free-ai-person-detection-for-blue-iris.37330/
GNU General Public License v2.0
169 stars 96 forks source link

History load speed #6

Open Lazersfly opened 4 years ago

Lazersfly commented 4 years ago

The current history load speed is pretty slow and is not limited by any filters, what is causing it to be slow and how can it be fixed?

gentlepumpkin commented 4 years ago

Yes, the loading speed of the history list is terrible (even after I enhanced it massively).

The history list contains some more invisible columns containing additional information (p.e. one column stores the positions of detected objects in each image). All these information are loaded sequentially for All entrys from the history.csv file.

So possible points to enhance are (in order of what I think might have the biggest impact):

  1. store the data which is currently stored in the hidden column somewhere else. It's a super dirty way to store data in a visual element, I did it because I did not know a good other way back then and wanted to get a working piece of software.
  2. find a more efficient way to load the data from the history.csv file.

I think these two should have a big impact. The following ideas don't really solve the underlying problem, but certainly also will bring us to good speed while omitting the need to rewrite the whole detection storing in AI Tool:

  1. load individual information only when an item is selected (or only for the visible list items or ...)
  2. do not load all entrys and add entrys while scrolling (problem: the scrollbar will change [or maybe not a problem?] -> possible solution: make empty entries and add text while scrolling)
  3. load list entrys in parallel instead of sequential

Enhancing the history loading speed will also give us a faster startup speed, as lags during startup are caused by loading the whole history list.

VorlonCD commented 4 years ago

I use 'FastObjectListView', all the time. MUCH faster than default listview. But will need to convert the cvs list items to be a class, then give a 'list of class' to FOLV. I can actually do this for you eventually. Currently working on a fork to completely control the windows version of DeepStack. start/stop/install path/etc. Nearly done. Hate the default deepstack.exe, no minimize, no restart, etc. I've also created a few true .net based 'services' before, but that would be a bit of work... Need to split up any GUI stuff, then communicate with the service through something like an internal TCP connection. The tray icon would communicate with the non-GUI service app, and the service would do all the 'real' work.