Hi
I did some research on sql and how it used in IREX device in file viewer,
and spend several hours to implement new design of queuing for files in ctb
In short new design:
1) SELECT from data base will return minimum info, in order minimize memory load.
2) All QUERIES done in such manner that SQL use only 1 index to retrive data.
3) All data for each item will be loaded when it needed. On preparing view.
4) When ctb starts it will automatically create needed indixes in not exists.
5) It would be nice implement caching for items in page, Next time.
So selecting all items from data base will be only while changing sort order or directory. When changing view only visible items are loaded from db.
In my tests I get time about 3-10 shorter then old version.
For example:
First loading: 22415 <=> 6381
Change to icon view: 54536 <=> 2435 (no loading done here)
Sort by author: 14079 <=> 7311.
Changed programs: ctb and libermetadb.so.0.0.0
Attached version for test.
Hav a nice day
Yura