openzim / gutenberg

Scraper for downloading the entire ebooks repository of project Gutenberg
https://download.kiwix.org/zim/gutenberg
GNU General Public License v3.0
130 stars 37 forks source link

Title-search does not scale #109

Open rgaudin opened 4 years ago

rgaudin commented 4 years ago

Contributed feature --title-search adds a text input in home UI to type the beginning of a title and display suggestions.

This is done the same way the authors suggestion works, by dumping all books infos in a large javascript array.

While this is OK on small selections, it would freeze the UI and may lead to memory issue on large selections (dozens of thousands of books).

We should:

kelson42 commented 4 years ago

Clearly a blocker for a new release to me.

rgaudin commented 4 years ago

As this is a new, not yet deployed feature, I'd be fine with either disabling it in next release or (as suggested above), add a warning so that user know to use it only on limited sets.

This could be fixed in the following release.

satyamtg commented 4 years ago

@rgaudin @kelson42 , I don't know a lot about IndexedDB but from what I know -

Now, since we have hundreds of thousands of book names, the problem would be importing such large data from the file that we create using python. Like importing that data to the indexeDB would certainly take some time (BTW this seems to do it easily), for the first run and maybe updating on subsequent runs (if the database is lost), but would be less heavy on resources.

I think going with Dexie.js would be a good choice instead of a pure indexedDB implementation (although I may be wrong on this) as it provides easy import and we can write the json from python easily.

What do you suggest?

rgaudin commented 4 years ago

We had a POC with PouchDB that demonstrated it would be ok. that’s what nautilus uses. I’ll fill you in

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.