View Single Post
Old 06-25-2011, 11:29 AM   #47
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by yuri_b View Post
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
Looks impressive.
How many books/entries do you have in your global.db file?

Could you share the sources?
Iņigo is offline   Reply With Quote