[zathura] Zathura is slow when searching the first time

2013-11-01 Thread Ignas Anikevičius
Dear list,

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.

- Memory usage goes up from about 180MB to about 320MB during the first
  search, but subsequent searches do not cause an increase in memory.

- Subsequent searches are also much much faster, almost instant.

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.

Thanks,

Ignas A.


digital-signature.asc
Description: Digital signature
___
zathura mailing list
zathura@lists.pwmt.org
http://lists.pwmt.org/mailman/listinfo/zathura


Re: [zathura] remembering vertical position on PgDn

2013-11-01 Thread Sebastian Ramacher
On 2013-10-29 11:53:27, Andrei Mikhailov wrote:
 Hi!
 
 I have recently discovered Zathura, it looks very nice!
 However, I have a very basic quesion. When I go to the next page or previous 
 page,
 is it possible to land on the same vertical position? Generally speaking, is 
 it 
 possible to make Zathura remember the vertical position within the page
 while jumping? 

This issue might be related to http://bugs.pwmt.org/issue328. Does
remapping as described in the bug fix it for you?

Regards
-- 
Sebastian Ramacher
___
zathura mailing list
zathura@lists.pwmt.org
http://lists.pwmt.org/mailman/listinfo/zathura


Re: [zathura] Zathura is slow when searching the first time

2013-11-01 Thread Sebastian Ramacher
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


signature.asc
Description: Digital signature
___
zathura mailing list
zathura@lists.pwmt.org
http://lists.pwmt.org/mailman/listinfo/zathura