Skip to content

RustPad v2.3.0 — Virtualized 100+ MB .docx Engine, Progressive Viewport Thumbnails & Zero-Copy CoW

Choose a tag to compare

@github-actions github-actions released this 31 Oct 22:39
· 50 commits to main since this release
f75ee15

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 allocated 1.6–3.3 GB of uncompressed RGBA buffers for 100+ 4K screenshots) with probe_media_dimensions (O(1) 24-byte header scan for exact aspect ratios) and progressive decode_any_image_thumbnail_rgba downsampling (<= 1440px, max 3 decodes/frame, bounded 64 MiB LRU 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 .docx previously ran double synchronous O(N) LZ77 compression (save_docx_bytes + zlib_compress) inside SnapshotVault::capture and deep-cloned raw media across UndoHistory. ImageBlock now stores SharedBytes, deduplicates repeated archive assets on load, and captures in-memory Time-Machine & Undo snapshots in < 0.05 ms with zero media duplication.
  • Hardened PKZIP 1 GiB Budget & STORED Media Fast Path (crates/rustpad_zip): Raised archive ceilings from 256 MiB / 4,096 entries / 250:1 ratio (which rejected >30 MB multi-page .docx archives and dense XML) to 1 GiB / 32,768 entries / 2,000:1 ratio, and skips redundant DEFLATE passes on pre-compressed PNG/JPEG/WebP media (~500x faster .docx saves).
  • 64 MP / 32,768px Codec Support, Layout-Table Images & Crash Containment (crates/docx_io, crates/rustpad_window, app/build.rs): Raised PNG/JPEG/BMP limits from 8,192px / 32 MP to 32,768px / 64 MP for stitched Retina screenshots, surfaces <w:drawing> / <w:pict> figures inside <w:tbl> cells, caches paginated layout (Rc<Vec<Vec<LaidOutBlock>>>) with O(W) word-wrapping and sub-page block culling, provisions a 16 MiB Win32 stack (/STACK:16777216), and guards Win32 wnd_proc + open_path with std::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