View Single Post
Old 04-03-2011, 04:33 AM   #12
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by Iņigo View Post
I was thinking in another way: instead of "wasting" one precious item on HOME (DR800 only allows 12 per page, 11 default links + 1 "continue reading last opened book"), my idea is to put a link on the popupmenu, not on ctb's HOME, which would open <SD card>/Programs folder.
It's easier to code and requires same work for the user, 2 clicks (menu and menu-link vs. HOME and home-link).
A, yes I see. I changed the View-code, so I can control which icons appear on Home and on which position.
Quote:
Originally Posted by Iņigo View Post
Maybe I'm missing something... but we could create specialized queries for each view, using LIMIT and OFFSET clauses we'd avoid retrieving DB rows for every book in the DR.
The only problem I can think of is the Sort by Title / Author that requires all the items to build the ABCDE toolbar at the right. Don't think the other view modes (by size, by file type, by recently opened, by added) require to retrieve all books.
There are two parts, retrieving them from global.db and storing them into a memory structure (and using the huge amount of data). For every kind of sorting, all records in the database need to be queried to be able to sort them all according to the sort-criteria. After that the LIMIT/OFFSET are applied. I am not sure what is causing the longest delay, reading all data from the database or having a lot of items in the internal memory? Some measurements should clear this up.

Quote:
Originally Posted by Iņigo View Post
All in all, what I am only sure about is that I don't know what I want exactly...
only random ideas: tags, metadata, fast sort_by_recently_opened and sort_by_recently_added...

I have to rest these ideas.
The recently opened and recently added already use LIMIT, if they also take a lot of time with 3000 books then the delay seems to be in the database access.
Quote:
Originally Posted by Iņigo View Post
Btw, as you'll have already noticed, I've published the vala package and new examples. Take a look at them and discover the beauty of vala
I already took a quick look, it indeed seems easier to program in vala then plain C.
Mackx is offline   Reply With Quote