LuteOrg / lute-v3

LUTE = Learning Using Texts: learn languages through reading. Python/Flask.
MIT License
416 stars 46 forks source link

Ability to change the "bar of comprehension" in "books" from using the next five pages to whole book (Note: performance killer) #405

Open jzohrab opened 5 months ago

jzohrab commented 5 months ago

Per Xolog in Discord:

Ability to change the "bar of comprehension" in "books" from viewing the next five pages/500 words to the whole book

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:

jzohrab commented 2 weeks 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.

jzohrab commented 3 days ago

I've made a change that lets you calc stats for up to 200 pages, which might make more people happy.

image

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.