Hi Ignas On 2013-11-01 22:33:02, Ignas Anikevičius wrote: > I was wondering if anybody could explain me why zathura is quite slow during > the first search? Try the following file as an example: > > http://www.komascript.de/files/scrguien.pdf > > What I observe: > > - During the first search zathura becomes unresponsive and when it has > "finished searching, then it becomes responsive again and everything is > fine.
Searching is currently done in the main thread, which causes the UI to freeze if the search needs some time to finish. > - Memory usage goes up from about 180MB to about 320MB during the first > search, but subsequent searches do not cause an increase in memory. That's probably caused by the backend libraries loading the file into memory. > - Subsequent searches are also much much faster, almost instant. I guess that's because most of the interesting stuff is now cached. > The above things make me wonder if we create another copy of all zathura pages > and then use them for searching or what? Where does the memory go? I'd really > love to use zathura full time, but sometimes search functionality is just too > resource intensive. We don't copy any pages. The only thing we do while searching is calling the respective seach function from the plugin which forwards to the search function provided by the backend. (Note that the mupdf plugins keeps the extracted text in memory. This could explain the groth in memory usage you see. But without knowing which plugins you are using, I'll state what zathura itself does.) There is one thing we need to do with the search code and that is to run in its on thread. There is a bug for the search performance issue at http://bugs.pwmt.org/issue330. Regards -- Sebastian Ramacher
Description: Digital signature
_______________________________________________ zathura mailing list firstname.lastname@example.org http://lists.pwmt.org/mailman/listinfo/zathura