[okular] [Bug 163297] Faster repeat searching of large documents

Philipp A. bugzilla_noreply at kde.org
Fri May 8 20:08:09 BST 2020


https://bugs.kde.org/show_bug.cgi?id=163297

Philipp A. <flying-sheep at web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |flying-sheep at web.de

--- Comment #3 from Philipp A. <flying-sheep at web.de> ---
Hello to 12 years ago!

I wrote a quick script to check how fast searching is when building an index
first from nothing, and found that it’s nearly as slow as an *early* search in
Okular.

At some point, Okular seems to have built a text search index, but it takes
much longer than the 21 seconds my script uses. I had Okular open for at least
some minutes before the search got fast (maybe even longer, I spent half an
hour to write the script).

Maybe the index only gets built once the visual page cache is full or so? Tell
me if I’m wrong, but I think we could improve search by building the index
ASAP.

https://gist.github.com/flying-sheep/27f99747f85abb20bab7dc732abe3f6a

    $ ./pdf_search.py '/home/phil/Dropbox/RPG/DSA/DSA 5/VR7 - Aventurische
Magie III (2018).pdf' Geode
    Index time : 0:00:21.465361
    Search time: 0:00:00.001145
    [31, 32, 33, 34, 35, 36, 37, 38, 126, 166]

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list