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

24 Commits

Author SHA1 Message Date
Frans de Jonge
773e24fc79 (chore) some require sorting. 2017-04-29 11:41:24 -07:00
Qingping Hou
f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 2017-01-02 19:52:09 -08:00
Qingping Hou
c22a3747d8 fix all the tests 2016-04-19 00:01:28 -07:00
chrox
f3e0d44cc4 disable jit on some modules on android
to make koreader on Android  more stable

and with these opt params:
```
require("jit.opt").start("sizemcode=64","maxmcode=64", "hotloop=10000")
```

The strategy here is that we only use precious mcode memory (jitting)
on deep loops like the several blitting methods in blitbuffer.lua and
the pixel-copying methods in mupdf.lua. So that a small amount of mcode
memory (64KB) allocated when koreader is launched in the android.lua
is enough for the program and it won't need to jit other parts of lua
code and thus won't allocate mcode memory any more which by our
observation will be harder and harder as we run koreader.
2016-04-07 23:43:58 +08:00
Qingping Hou
69f9ebd528 build: fix doc generation
also moved MD5 to koreader-base/ffi
2016-02-23 22:01:12 -08:00
chrox
a60544b1ad Koreader Ubuntu-touch port
Currently only tested on Ubuntu-touch emulator with framework
ubuntu-sdk-14.10 for armhf.
The ubuntu-touch port is binary compatible with the Kobo port
major changes in this PR are:
1. rename the emulator device to sdl device since both the emulator
and the ubuntu-touch target use libsdl to handle input/output.
2. ubuntu-touch app has no write access to the installation dir so
all write-outs should be in a seperate dir definded in `datastorage`.
2015-10-03 14:48:51 +08:00
chrox
07ff30f89c add md5:update and md5:sum methods 2015-03-02 14:55:16 +08:00
Hans-Werner Hilse
6b45a4ea06 fix cache implementation
the cache would behave badly when the same item was insert()ed twice:
it would add the size twice to memory consumption, but would never substract
it twice when purging the (actually single) object from cache. So the cache
would seem to fill up while in fact it wasn't.
2014-11-12 15:21:20 +01:00
Hans-Werner Hilse
78b098e47d make functions in MD5 implementation local
also get rid of mostly unused helper libraries and some stylistic
oddities in the MD5 code
2014-11-11 15:53:26 +01:00
chrox
f48c073357 persistent cache item now need an explicit persistent flag 2014-10-30 11:16:37 +08:00
chrox
281df50da5 fix #1028 2014-10-23 13:49:35 +08:00
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