View Single Post
Old 11-09-2009, 12:32 PM   #41
Jim Chapman
Addict
Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.Jim Chapman ought to be getting tired of karma fortunes by now.
 
Posts: 310
Karma: 2025434
Join Date: Oct 2009
Device: Lumia 950 Phone
Quote:
Originally Posted by jimnutt View Post
A couple of timings: for a 942kb epub file, it takes 28 seconds to load on an HTC touch pro, loading a library of 531 books takes 24 seconds.
Interesting stats - thankyou for doing the timings. One point worth noting is that the time to open will change - the first time you open the book it will take longer. Behind the scenes, this is what happens when you open a book:
1) The EPUB archive is uncompressed into the temporary folder (an EPUB file is just a ZIP file)
2) Freda opens each chapter individually (each chapter is an individual HTML file within the archive), parses it and loads the words into memory.
3) Freda then saves the words for the chapter (to a 'DAT' file in its temporary folder)
4) The words are measured and laid out on screen.

The first time you open a book, Freda has to do all of steps 1-4. The second time, it doesn't have to do 1, because the files are already there in the temp folder. It might not have to do 2 either, because there might already be a DAT file for the chapter - in which case, Freda just has to load the DAT file into memory (this is much faster than parsing HTML).

Bottom line: the first time you open a book, Freda spends most of its time unzipping the archive. The next time you open it, the time will be a lot shorter (and will mostly consist of the time it takes to measure the length and height of each word in pixels).

Thanks for trying out the program.

Jim
Jim Chapman is offline   Reply With Quote