Feature : exploit 8MB PSRAM in X4 V2
Top 3 Ways to Leverage 8 MB PSRAM (Ranked by Impact)
-
Page Lookahead & Pre-Rendering Buffer (Highest Impact)While the user is reading page $N$, the ESP32 CPU is idling 99% of the time.Implementation: Use PSRAM to parse and pre-render page $N+1$ (and $N-1$) into a 2-bit bitmap in the background.User Experience: When the user presses "Next Page", the image is already pre-computed in RAM. Page turns become instantaneous, bypassing the 500ms–2s calculation delay.
-
In-RAM Font & Glyph CachingFirmware like Papyrix or CrossPoint streams glyph bitmaps character-by-character from the SD card (.epdfont or .ttf) because ESP32-C3 lacked RAM.Implementation: Load entire TTF/OTF font files or pre-rendered glyph bitmap sets directly into PSRAM during startup or book load.User Experience: Eliminates hundreds of micro-reads from the SD card per page turn, making line-breaking and text wrapping drastically faster.
-
In-Memory Uncompressed Book & DOM CacheImplementation: Decompress the current EPUB chapter, CSS stylesheet, and document structure into a PSRAM-backed memory structure instead of writing and reading serialized .bin cache files on the SD card.User Experience: Instant chapter switching, faster font-size changes, and zero risk of SD card flash wear or file corruption during reading.
Promotion on X4 classic Powered by the ESP32-S3 dual-core processor, the X4 Classic delivers approximately 175% higher CPU benchmark performance, backed by an additional 8 MB of PSRAM for faster, smoother operation.
Yes. We can do this on all S3 targets: X4 Pro, X4 Classic, and Sticky.
The S3 chip has two cores. We can use the second core for parse and layout. Keep one owner for the renderer, fonts, SD files, and display. Do not run two renders at once.
Some of it is done. S3 uses PSRAM for the framebuffer, glyph cache, page image rows, and parser scratch.
Next-page pre-rendering is possible. It needs an off-screen render path. It also needs strict ownership of the renderer, fonts, and cache. This cuts render time. It does not cut panel refresh time.
A larger glyph cache may help. A small chapter cache may help. Measure on device first. Then set the cache sizes. Keep the SD page cache for large books and restarts.
I have no device timings yet. So I make no speed claim here.
Nice. Looking forward to the impact. I have some Sticky devices on order ...