Plan 9 from Bell Labs’s /usr/web/sources/patch/sorry/page-bitmapcache/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Added a cache to the page image viewer. This makes pdf viewing more convenient since you can flip back and forth between pages that are stored in the cache. The new command-line option -c allows the user to specify the maximum number of bitmaps to store.
Beyond pdf documents I tried opening several images at once, and it seems to work as expected: the rendered images are saved to the cache and once a few are loaded flipping between them is instant!
It would probably be nice if we start rendering the next page in the background, but I haven't attempted this yet -- let's see if this patch is satisfactory first.

For the manual page we can add something like:

As pages are rendered resulting bitmaps are cached to allow for fast page flipping.
The -c option is used to specify the maximum number of frames for the cache to keep around (default 15).
The page number and rotation angle uniquely identify a rendered page in the cache.
This means that a given page can exist in the cache up to four times (once for each angle).

Zack Folkerts
zfolkerts@flowerbed.dyndns.org

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.