← Back to team overview

qpdfview team mailing list archive

Re: [Question #219472]: Page preloading

 

Question #219472 on qpdfview changed:
https://answers.launchpad.net/qpdfview/+question/219472

    Status: Open => Answered

Adam Reichold proposed the following answer:
To expand on Benjamin's answers: The problem is the presentation view,
is does not cache and hence can't prefetch. So your observations are
entirely correct. It is not a bug, we did not add this to keep the
presentation view as simple as possible as we are/were aiming for
minimal code size. I'll see whether I can do something about that in the
next release.

As for the main view, the cache is shared between all documents and has
one entry for each page. It will cache pages as long as there is room
and free them on a last-recently-used basis. Of course, the one-page-
one-entry policy leads to cache invalidation on e.g. scale change.
Prefetching always tries to fetch one "row" before the current visisble
one and one "row" after, i.e. in single page mode this is +-1 whereas in
two-page mode this -2+3 from the current page. There used to be an
option to control the amount of prefetching ("prefetch distance"), but
it was decided that this is too much emphasis on what is essential a
performance hack. Again, I'll think about reintroducing it in the next
release.

The real catch here is of course, multi-threaded rendering which will
speed up things considerably when it hits Poppler. This improves
especially the conceived performance as this feeling of waiting for the
pages one-by-one is gone. But as Benjamin indicated, it will take some
time until this can be properly incorporated into Poppler.

-- 
You received this question notification because you are a member of
qpdfview, which is an answer contact for qpdfview.