mirror of https://github.com/koreader/koreader
master
pazos-patch-2
pazos-patch-1
v2024.07
v2024.04
v2024.03.1
v2024.03
v2024.01
v2023.10
v2023.08
v2023.06.1
v2023.06
v2023.05.1
v2023.05
v2023.04
v2023.03
v2023.01
v2022.11
v2022.10
v2022.08
v2022.07
v2022.06
v2022.05.1
v2022.05
v2022.03.1
v2022.03
v2022.02
v2022.01
v2021.12.1
v2021.12
v2021.11
v2021.10.1
v2021.10
v2021.09
v2021.08
v2021.07
v2021.06
v2021.05
v2021.04
v2021.03
v2021.02
v2021.01
v2021.01.1
v2020.12
v2020.11
v2020.10.1
v2020.10
v2020.09
v2020.08.1
v2020.08
v2020.07.1
v2020.07
v2020.06
v2020.05
v2020.04.1
v2020.04
v2020.03.2
v2020.03.1
v2020.03
v2020.02
v2020.01
v2019.12
v2019.11
v2019.10
v2019.09.3
v2019.09.2
v2019.09.1
v2019.09
v2019.08
v2019.07
v2019.06
v2019.05
v2019.04
v2019.03.1
v2019.03
v2019.02
v2019.01.1
v2019.01
v2018.12
v2018.11.1
v2018.11
v2015.11
v2015.11-stable
v2014.11
v2014.04
v2013.03
v2013.1
v2012.11
v2012.10
v2012.09
v2012.04.2
v2012.04.1
v2012.04
v2012.03
koreader-nightly-20150516
v2012.05
v2014.03.11-nightly
v2014.03.13-nightly
v2014.03.18-nightly
v2014.03.24-nightly
v2014.03.27-nightly
v2014.03.31-nightly
v2014.04-stable
v2014.04.03-nightly
v2014.04.05-nightly
v2014.04.08-nightly
v2014.04.10-nightly
v2014.04.18-nightly
v2014.04.24-nightly
v2014.04.25-nightly
v2014.05.02-nightly
v2014.05.06-nightly
v2014.05.09-nightly
v2014.05.16-nightly
v2014.05.17-nightly
v2014.05.18-nightly
v2014.05.19-nightly
v2014.05.20-nightly
v2014.05.24-nightly
v2014.06.01-nightly
v2014.06.02-nightly
v2014.06.03-nightly
v2014.06.04-nightly
v2014.06.05-nightly
v2014.06.06-nightly
v2014.06.08-nightly
v2014.06.09-nightly
v2014.06.11-nightly
v2014.06.12-nightly
v2014.06.18-nightly
v2014.06.23-nightly
v2014.06.27-nightly
v2014.06.29-nightly
v2014.07.02-nightly
v2014.07.03-nightly
v2014.07.04-nightly
v2014.07.14-nightly
v2014.07.15-nightly
v2014.07.16-nightly
v2014.07.17-nightly
v2014.07.19-nightly
v2014.07.20-nightly
v2014.07.24-nightly
v2014.07.27-nightly
v2014.07.28-nightly
v2014.08.02-nightly
v2014.08.04-nightly
v2014.08.06-nightly
v2014.08.07-nightly
v2014.08.11-nightly
v2014.08.12-nightly
v2014.08.13-nightly
v2014.08.20-nightly
v2014.08.21-nightly
v2014.08.23-nightly
v2014.08.24-nightly
v2014.08.27-nightly
v2014.08.28-nightly
v2014.08.29-nightly
v2014.09.11-nightly
v2014.09.14-nightly
v2014.09.29-nightly
v2014.10.03-nightly
v2014.10.05-nightly
v2014.10.08-nightly
v2014.10.14-nightly
v2014.10.15-nightly
v2014.10.20-nightly
v2014.10.22-nightly
v2014.10.24-nightly
v2014.10.28-nightly
v2014.10.29-nightly
v2014.10.30-nightly
v2014.10.31-nightly
v2014.11-stable
v2014.11.07-nightly
v2014.11.10-nightly
v2014.11.11-nightly
v2014.11.12-nightly
v2014.11.13-nightly
v2014.11.14-nightly
v2014.11.17-nightly
v2014.11.18-nightly
v2014.11.21-nightly
v2014.11.24-nightly
v2014.11.25-nightly
v2014.11.26-nightly
v2014.11.27-nightly
v2014.11.28-nightly
v2014.11.29-nightly
v2014.12.01-nightly
v2014.12.03-nightly
v2014.12.06-nightly
v2014.12.07-nightly
v2014.12.22-nightly
v2014.12.29-nightly
v2015.01.15-preview
v2015.01.19-nightly
v2015.01.28-pb-test
v2015.01.31-nightly
v2015.02.02-nightly
v2015.02.07-nightly
v2015.02.09-nightly
v2015.02.12-nightly
v2015.03.06-nightly
v2015.03.16-nightly
v2015.03.17-nightly
v2015.03.18-nightly
v2015.03.20-nightly
v2015.03.22-nightly
v2015.03.24-nightly
v2015.04.01-nightly
v2015.04.07-nightly
v2015.04.14-nightly
v2015.04.15-nightly
v2015.04.16-nightly
v2015.04.24-nightly
v2015.04.27-nightly
v2015.04.30-nightly
v2015.05.17-nightly
v2015.06.04-nightly
v2015.06.08-nightly
v2015.06.16-nightly
v2015.06.25-nightly
v2015.07.17-nightly
v2015.08.08-nightly
v2015.09.11-nightly
v2015.09.17-nightly
v2015.10.06-nightly
v2015.10.08-nightly
v2015.10.24-nightly
v2015.10.27-nightly
v2015.12.13-nightly
v2016.02.14-nightly
v2016.02.16-nightly
v2016.02.27-nightly
v2016.03.15-nightly
v2016.03.23-nightly
v2016.04.13-nightly
v2016.04.27-nightly
v2016.05.13-nightly
v2016.05.29-nightly
v2016.06.02-nightly
v2016.06.20-nightly
v2016.06.24-nightly
v2016.07.02-nightly
v2016.07.14-nightly
v2016.08.14-nightly
v2016.08.23-nightly
v2016.11.20-nightly
v2017-10-23-nightly
v2017.02.09-nightly
v2017.03.08-nightly
v2017.04.30-nightly
v2017.06.12-nightly
v2017.08.21-nightly
v2017.10.04-nightly
v2018.01.10-nightly
v2018.02.12-nightly
v2018.03.14-beta
v2018.04.10-beta
v2018.04.12-beta
v2018.06.02-beta
v2018.07.29-beta
v2018.10.07-beta
${ noResults }
6 Commits (8dad62aa1bd368ecd8ac3e0adf8710e529797af5)
Author | SHA1 | Message | Date |
---|---|---|---|
NiLuJe |
fadee1f5dc
|
Clarify our OOP semantics across the codebase (#9586)
Basically: * Use `extend` for class definitions * Use `new` for object instantiations That includes some minor code cleanups along the way: * Updated `Widget`'s docs to make the semantics clearer. * Removed `should_restrict_JIT` (it's been dead code since https://github.com/koreader/android-luajit-launcher/pull/283) * Minor refactoring of LuaSettings/LuaData/LuaDefaults/DocSettings to behave (mostly, they are instantiated via `open` instead of `new`) like everything else and handle inheritance properly (i.e., DocSettings is now a proper LuaSettings subclass). * Default to `WidgetContainer` instead of `InputContainer` for stuff that doesn't actually setup key/gesture events. * Ditto for explicit `*Listener` only classes, make sure they're based on `EventListener` instead of something uselessly fancier. * Unless absolutely necessary, do not store references in class objects, ever; only values. Instead, always store references in instances, to avoid both sneaky inheritance issues, and sneaky GC pinning of stale references. * ReaderUI: Fix one such issue with its `active_widgets` array, with critical implications, as it essentially pinned *all* of ReaderUI's modules, including their reference to the `Document` instance (i.e., that was a big-ass leak). * Terminal: Make sure the shell is killed on plugin teardown. * InputText: Fix Home/End/Del physical keys to behave sensibly. * InputContainer/WidgetContainer: If necessary, compute self.dimen at paintTo time (previously, only InputContainers did, which might have had something to do with random widgets unconcerned about input using it as a baseclass instead of WidgetContainer...). * OverlapGroup: Compute self.dimen at *init* time, because for some reason it needs to do that, but do it directly in OverlapGroup instead of going through a weird WidgetContainer method that it was the sole user of. * ReaderCropping: Under no circumstances should a Document instance member (here, self.bbox) risk being `nil`ed! * Kobo: Minor code cleanups. |
2 years ago |
NiLuJe | 2635593890 |
Cache: Some more tweaks after #7624
* Allow doing away with CacheItem Now that we have working FFI finalizers on BBs, it's mostly useless overhead. We only keep it for DocCache, because it's slightly larger, and memory pressure might put us in a do or die situation where waiting for the GC might mean an OOM kill. * Expose's LRU slot-only mode And use it for CatalogCache, which doesn't care about storage space * Make GlyphCache slots only (storage space is insignificant here, it was always going to be evicted by running out of slots). * More informative warning when we chop the cache in half |
3 years ago |
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. |
4 years ago |
NiLuJe | ce624be8b8 |
Cache: Fix a whole lot of things.
* Minor updates to the min & max cache sizes (16 & 64MB). Mostly to satisfy my power-of-two OCD. * Purge broken on-disk cache files * Optimize free RAM computations * Start dropping LRU items when running low on memory before pre-rendring (hinting) pages in non-reflowable documents. * Make serialize dump the most recently *displayed* page, as the actual MRU item is the most recently *hinted* page, not the current one. * Use more accurate item size estimations across the whole codebase. TileCacheItem: * Drop lua-serialize in favor of Persist. KoptInterface: * Drop lua-serialize in favor of Persist. * Make KOPTContext caching actually work by ensuring its hash is stable. |
4 years ago |
chrox | 92219a1f1e | cleanup: expand tab to 4 spaces | 11 years ago |
HW | ef111b99c6 | Refactored to use strictly locals | 11 years ago |