Repository navigation
RustPad v2.3.0 — Virtualized 100+ MB .docx Engine, Progressive Viewport Thumbnails & Zero-Copy CoW
RustPad v2.3.0 — Virtualized Large-Document & Multi-Screenshot Engine
Fixes #47 (30+ MB multi-page, high-resolution screenshot-heavy .docx crash, OOM memory explosion, and main-thread freeze) while keeping zero external crates.io dependencies and 60–120Hz native responsiveness.
Root Causes Eliminated & New Architecture
- Viewport-Only 64 MiB LRU Thumbnail Streaming (
app/src/word_view.rs,crates/rustpad_render): Replaced eager upfront decoding of every off-screen figure on frame 1 (which allocated1.6–3.3 GBof uncompressed RGBA buffers for 100+ 4K screenshots) withprobe_media_dimensions(O(1)24-byte header scan for exact aspect ratios) and progressivedecode_any_image_thumbnail_rgbadownsampling (<= 1440px, max 3 decodes/frame, bounded64 MiBLRU cache + corrupt-media tombstones). - Zero-Copy Reference-Counted Media (
SharedBytes/Arc<[u8]>) & Instant Time-Machine CoW (crates/doc_model,crates/power_tools): Opening a 30+ MB.docxpreviously ran double synchronousO(N)LZ77 compression (save_docx_bytes+zlib_compress) insideSnapshotVault::captureand deep-cloned raw media acrossUndoHistory.ImageBlocknow storesSharedBytes, deduplicates repeated archive assets on load, and captures in-memory Time-Machine & Undo snapshots in< 0.05 mswith zero media duplication. - Hardened PKZIP
1 GiBBudget &STOREDMedia Fast Path (crates/rustpad_zip): Raised archive ceilings from256 MiB/4,096entries /250:1ratio (which rejected >30 MB multi-page.docxarchives and dense XML) to1 GiB/32,768entries /2,000:1ratio, and skips redundant DEFLATE passes on pre-compressed PNG/JPEG/WebP media (~500x faster.docxsaves). - 64 MP /
32,768pxCodec Support, Layout-Table Images & Crash Containment (crates/docx_io,crates/rustpad_window,app/build.rs): Raised PNG/JPEG/BMP limits from8,192px/32 MPto32,768px/64 MPfor stitched Retina screenshots, surfaces<w:drawing>/<w:pict>figures inside<w:tbl>cells, caches paginated layout (Rc<Vec<Vec<LaidOutBlock>>>) withO(W)word-wrapping and sub-page block culling, provisions a 16 MiB Win32 stack (/STACK:16777216), and guards Win32wnd_proc+open_pathwithstd::panic::catch_unwind.
Direct Downloads (0 Dependencies · Portable Native Binaries)
- Windows 10/11 x64 (
Win32 GDI):rustpad-v2.3.0-windows-x86_64.exe/rustpad.exe - Linux x86_64 (
X11):rustpad-v2.3.0-linux-x86_64 - Checksums:
SHA256SUMS.txt