paperwork icon indicating copy to clipboard operation
paperwork copied to clipboard

Paperwork takes dozens of seconds to load

Open mjourdan opened this issue 8 years ago • 3 comments

How to reproduce

Just start Paperwork (unstable 1.3)

Actual Behavior

No documents is shown. It takes about 25 seconds before showing something useful, even on high-end hardware with a number of documents as low as 76.

Expected Behavior

Populating the document list with the most recent items should be instantaneous.

Shell output

paperwork-output-startup.txt

mjourdan avatar Aug 30 '17 18:08 mjourdan

I think there are things that can be done on Paperwork side. For instance, since we display only the first 100 documents when starting (gtk optim), we don't need to load the whole document list.

There may be also optimisations that could be done on Python-whoosh size. For instance, if the indexation speed can be really improved (#683), maybe we can consider always writing optimized index files (which would also speed up search at the same time).

jflesch avatar Sep 28 '17 14:09 jflesch

I've not taken a look at the code yet, but how easy is it to plug in other FTS engines besides Whoosh? Both SQLite and Postgres have very fast FTS engines.

JoshuaPK avatar Nov 18 '17 23:11 JoshuaPK

This ticket is about the initial loading time, not the search. The ticket for the search load time is #651 . And replacing the the FTS engine would imply rewriting most of paperwork_backend/index.py (can be done if required, but I doubt it's a real solution). Postgres would be too impractical for Paperwork (remember that the goal here is to be as simple to use as possible). And regarding Sqlite, afaik, it doesn't support fuzzy searches.

jflesch avatar Nov 19 '17 11:11 jflesch