Commit Graph

12 Commits (775e5ea3b48bb447894dc335aae5ba3450e236de)

Author SHA1 Message Date
chrox 775e5ea3b4 serialize the most recently used blitbuffer/koptcontext
to speedup koreader startup for PDF/DJVU documents
especially when reflowing
10 years ago
chrox 92219a1f1e cleanup: expand tab to 4 spaces 10 years ago
chrox 904a5f1ebe calculate maximum global cache size from free RAM
In reflowing scroll mode with 2 pages hinting, 4 full page blitbuffers
and koptcontexts should stay well in cache in the most demanding cases,
with two pages shown on screen and two pages rendered in background.
Since blitbuffer size is halved the size of page, we need cache size
to be 6 times an average reflowed page size.

For Kobo Aura HD which has a resolution of 1440×1080, a reflowed page
could become 1080×4800. So 30MB of cache is demanded for this case.

This PR implements dynamic cache size allocating according to size of
system free memory. By default it will use 20 percent of free RAM with
a clip specified by DGLOBAL_CACHE_SIZE_MINIMUM and
DGLOBAL_CACHE_SIZE_MAXIMUM which are 10MB and 30MB respectively by default.
11 years ago
HW ef111b99c6 Refactored to use strictly locals 11 years ago
Qingping Hou 561c7902ca move defaults.lua to root directory 11 years ago
Qingping Hou 18122fe067 add defaults.lua 11 years ago
chrox 4e1572d7d0 change cache size to 10 MB 11 years ago
chrox 8f18ee260c increase max size of cache item 11 years ago
chrox 4fda0611c2 remove unnecessary require 11 years ago
chrox 01f045e7f9 add standalone glyph cache
I found it will be especially helpful to cache glyph separately
so that glyph caches won't be washed out by a single page cache.
11 years ago
Qingping Hou 687aabc173 adapt ui to loadDocument before setFont 12 years ago
HW 9e531fc2db file reorganisation
all lua frontend files are now in the frontend/ directory.
all old code is cleaned up.
12 years ago