Commit Graph

7 Commits (master)

Author SHA1 Message Date
NiLuJe 21b067792d Cache: Rewrite based on lua-lru
Ought to be faster than our naive array-based approach.
Especially for the glyph cache, which has a solid amount of elements,
and is mostly cache hits.
(There are few things worse for performance in Lua than
table.remove @ !tail and table.insert @ !tail, which this was full of :/).

DocCache: New module that's now an actual Cache instance instead of a
weird hack. Replaces "Cache" (the instance) as used across Document &
co.
Only Cache instance with on-disk persistence.

ImageCache: Update to new Cache.

GlyphCache: Update to new Cache.
Also, actually free glyph bbs on eviction.
3 years ago
NiLuJe 9cda84ef2f Prevent Busted from blowing up on cdata finalizers by properly closing
opened documents...
3 years ago
Frans de Jonge e3c17aa6d0 Travis: run luacheck on unit tests (#3059)
* Travis: run luacheck on unit tests
7 years ago
Qingping Hou c22a3747d8 fix all the tests 8 years ago
chrox d0b4fa2665 refactoring unit testsuite 10 years ago
chrox f1f8d8dc4f make coverage target for code coverage for the unit test
so that we can easily find which module needs unit test

In order to run 'make coverage' `luacov` need to be installed
with 'sudo luarocks install luacov'.
10 years ago
chrox da84daf17f add cache spec 10 years ago