2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
chrox
b7c7287bab remove more global variables 2014-08-14 19:52:30 +08:00
chrox
775e5ea3b4 serialize the most recently used blitbuffer/koptcontext
to speedup koreader startup for PDF/DJVU documents
especially when reflowing
2014-04-30 23:24:47 +08:00
chrox
92219a1f1e cleanup: expand tab to 4 spaces 2014-03-13 21:52:43 +08:00
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.
2014-01-19 11:40:34 +08:00
HW
ef111b99c6 Refactored to use strictly locals 2013-10-18 22:38:07 +02:00
Qingping Hou
561c7902ca move defaults.lua to root directory 2013-07-01 02:55:28 -04:00
Qingping Hou
18122fe067 add defaults.lua 2013-07-01 02:41:33 -04:00
chrox
4e1572d7d0 change cache size to 10 MB 2013-04-30 13:45:14 +08:00
chrox
8f18ee260c increase max size of cache item 2013-04-20 16:10:46 +08:00
chrox
4fda0611c2 remove unnecessary require 2013-03-26 13:21:29 +08:00
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.
2013-03-25 16:26:57 +08:00
Qingping Hou
687aabc173 adapt ui to loadDocument before setFont 2013-01-13 10:22:33 +08:00
HW
9e531fc2db file reorganisation
all lua frontend files are now in the frontend/ directory.
all old code is cleaned up.
2012-05-19 01:10:57 +02:00