View Single Post
Old 08-15-2015, 10:02 AM   #173
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by GeoffR View Post
I can still test it. Although I have patched sickel I can still tell when the original sickel would have rebooted by the amount of time the reading stats takes to open.

The time the reading stats tile takes to open after a device restart does seem to be related to the current read. I guess it doesn't keep the stats as running totals but has to trawl through the database to compute them from the individual reading session data for the book. So if you have a large book that has taken a long time to read (i.e. many sessions over many days) then it will take much longer to open the tile than for a book which hasn't had many reading sessions. So perhaps not directly related to the size of the epub itself, but to how complicated the reading history for that book is.

I guess some of the reading stats have to be computed when you open the book for the first time after a device restart too, so it can compute and display the time to finish.

The book was this one, it has the problem where the publisher has put more than one chapter in a file, and it has an incomplete TOC so the KePub synced from Kobo has some automatically-generated TOC entries titled "Untitled chapter". Unfortunately that is not altogether uncommon for backlist books. Stats say it took me 31.1 hours to read at an average 42 minutes per session, but I took a break and read another book part way through so it was spread out over a week, and I might have opened the book a few times back around the time I bought it which was a few months (and firmware versions) ago.

Edit: Another factor is probably that I keep all the books I have finished on the device, and it has been a long time since I did a factory reset, so to compute the stats for total hours read is always going to be slow the first time if no running total is kept. Even with a newly opened book as current read, the stats tile takes a long time to open the first time after the device starts.

My database probably has a fair bit of cruft, but this is just a consequence of the hardware and firmware being so solid and reliable, I've never had a corrupt database and so never needed to do a factory reset (although I did do one by accident last year sometime.)
That's all pretty much what I thought. A big book with lots of ToC entries and a "mature" database.

For the stats, I don't know if they store the totals. For each book you read, there are multiple rows in the Events table. Two of these are about opening and closing the book. There is a counter for the number of times an a blob that seems to record a timestamp each time this happens. I assume the time for the book is calculated from the difference of the pairs of these in each row.

Hopefully there is a separate counter for total hours read. The above is probably OK for the time for a book, but for the total time, it would be take a fair bit of time once you have read a few hundred books. But calculating it once when the device starts might be how they do it. And that could explain a restart if the calculation hasn't finished when the stats is opened.

Unfortunately, I can't think of a good way to reproduce this. It needs a database like yours. I've done a factory reset on each of mine recently while fiddling around. The last time I tried creating rows in the Events table it didn't work. This is probably a place where the only choice is to increase the sickel timeout, or for the nickel to turn this off for a little bit.
davidfor is offline   Reply With Quote