Open jzohrab opened 5 months ago
This creates problems with long books -- I tried it out with a Spanish book of 600 pages, and the stats update for the whole book took several seconds. That would be extremely annoying, because it causes a long stats calc lag time every time I open up the book and even read just one page.
Of course stats could be calculated differently, perhaps cached etc, but that creates other problems -- cache management, invalidation, updates, etc.
I've made a change that lets you calc stats for up to 200 pages, which might make more people happy.
This is in the develop
branch, will be in the next launch. There's still other performance work to do, likely using ahocorapy
, per #484.
Per Xolog in Discord:
My notes:
The code with the "5-page" constraint is in lute/book/stats.py, 5 is hardcoded in a routine at the top. This could pull from a user setting. It may create all sorts of problems though!
Size estimate notes: