View Single Post
Old 06-25-2011, 10:32 AM   #46
yuri_b
Connoisseur
yuri_b will become famous soon enoughyuri_b will become famous soon enoughyuri_b will become famous soon enoughyuri_b will become famous soon enoughyuri_b will become famous soon enoughyuri_b will become famous soon enough
 
Posts: 71
Karma: 592
Join Date: Aug 2010
Device: irex dr800sg DR1000S
Smile new design of ctb

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
Attached Files
File Type: zip ctb800sg2.zip (73.2 KB, 445 views)

Last edited by yuri_b; 06-25-2011 at 11:12 AM.
yuri_b is offline   Reply With Quote