| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| OpenPublisher-5-x86_64.AppImage | 2026-10-02 | 166.4 MB | |
| openpublisher5_amd64-windows-portable.exe | 2026-10-02 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-10-02 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-10-02 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-10-02 | 193.4 MB | |
| 5.2.0_ Beta WordArt Loading Acceleration Engine _ Performance Architecture source code.tar.gz | 2026-10-02 | 22.4 MB | |
| 5.2.0_ Beta WordArt Loading Acceleration Engine _ Performance Architecture source code.zip | 2026-10-02 | 22.6 MB | |
| README.md | 2026-10-02 | 9.1 kB | |
| openpublisher5_amd64-linux.rpm | 2026-10-02 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-10-02 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-10-02 | 156.2 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-10-02 | 185.5 MB | |
| Totals: 12 Items | 1.7 GB | 0 | |
π Summary
Version 5.2.0 introduces the 4-Pillar WordArt Acceleration Architecture, completely eliminating the 11-second browser freeze when opening the WordArt (BETA) gallery. By migrating from eager upfront generation of all 500 styles to a viewport-aware lazy loading pipeline with downscaled thumbnail canvas rendering, in-memory caching, and idle pre-warming, modal opening latency drops from 11,200 ms to ~150 ms (a 75x speedup).
In addition, version 5.2.0 updates cachebusters across all application components, updates the Service Worker cache (open-publisher-v5-2-0), refreshes PWA registration, and updates dashboard template fetching.
π Root Cause Analysis
Investigation and profiling in Chromium revealed four compound factors that caused the 11-second freeze:
-
Eager Upfront Loop: In
elements/wordart/beta-wordart.js,showBetaWordArtModalexecuted a monolithic loop for all 500 styles immediately upon opening the modal. All 500 canvases were submitted for rendering upfront regardless of visibility. -
Massive Over-Resolution in Previews: The
generateWordArtPNGengine renders text using a large base font size (130px) on canvases spanning1000px to 1400pxwide and360px to 600pxtall. The card preview displayed in the modal is only140px x 50px. Computing over 600,000 pixels per style just to downscale them via CSS generated roughly 60 times more pixels than needed. -
Synchronous PNG Compression Overhead: Calling
canvas.toDataURL('image/png')on a 1000x400 canvas performs synchronous Deflate PNG compression on the browser main thread, consuming 15ms to 25ms of CPU time per image. Multiplied across 500 styles, this produced over 10,000ms of continuous main thread lockup. -
Lack of Viewport Awareness: Only 20 to 30 preview cards are visible in the modal grid container at any given time. The remaining 470+ cards are off-screen below the fold, yet the previous engine forced the browser to render the entire catalog before yielding control.
π οΈ Fixes & Implementation Details
1. Viewport-Aware Lazy Loading (IntersectionObserver)
- Replaced the eager rendering loop with instant DOM creation of all 500
.beta-wa-cardelements featuring CSS skeleton shimmer placeholders and style badges. - Attached an
IntersectionObserverto the modal grid container (#beta-wa-grid-container) with a 250px lookahead buffer (rootMargin: '250px 0px 250px 0px'). - Only cards currently in or approaching the visible scroll area trigger canvas rendering. Once a card's preview renders, it is unobserved to free memory.
- Reduces initial render requirements from 500 styles down to ~25 visible cards (a 95% reduction in initial compute).
2. Downscaled Preview Canvas Engine (Thumbnail Scale)
- Enhanced
generateWordArtPNG(text, styleId, isPreview = false): - When
isPreview === true(gallery modal previews): After trimming transparent borders, the image is smoothly drawn onto a thumbnail canvas scaled to fit within 240px x 70px (scale = Math.min(240 / w, 70 / h, 1.0)). - Processing ~11,000 pixels instead of ~600,000 pixels drops PNG encoding time from ~20ms down to ~1.2ms per card.
- When
isPreview === false(clicking OK to insert into the document): The engine renders at full 130px print resolution, maintaining razor-sharp print and export fidelity.
3. In-Memory Preview Cache (window._betaWAPreviewCache)
- Cached generated preview data URLs in a dedicated Map (
window._betaWAPreviewCache). - Scrolling back and forth within the gallery retrieves pre-rendered styles in 0.00 ms with zero canvas calculation.
- Reopening the dialog during the same session displays existing cards instantaneously.
4. Progressive Idle Pre-Warming (requestIdleCallback)
- Implemented a background queue that renders unrendered off-screen styles during browser idle slices (
requestIdleCallbackwith a 30ms fallback). - Smoothly prepares styles ahead of rapid user scrolling without dropping UI frame rates below 60 FPS.
5. Canvas Context Optimization (willReadFrequently)
- Added
{ willReadFrequently: true }tocanvas.getContext('2d')inelements/wordart/beta-wordart.js. - Keeps the canvas backing store in system memory rather than GPU textures, accelerating
getImageData()readbacks during transparent border trimming and eliminating Chromium console warnings.
6. Card Skeleton Shimmer UI
- Added
.beta-wa-skeletonand@keyframes betaWaSkeletonShimmerto provide modern, polished shimmer placeholders while cards await rendering. - Displays
#1,#2,#3style indicators so users can identify styles even before thumbnail rendering finishes.
7. Application-Wide Cache & Version Synchronization
- Synchronized version string across cachebusters, service workers, PWA install engine, and dashboard templates.
π Benchmark & Performance Comparison
| Metric | Version 5.1.13 | Version 5.2.0 | Improvement |
|---|---|---|---|
| Initial Modal Open Delay | ~11.2 seconds | ~0.15 - 0.25 seconds | 75x faster |
| Initial Previews Computed | 500 images upfront | ~25 - 35 visible images | 93% reduction in initial workload |
| Per-Card Render Time | 18 - 25 ms | 1.0 - 1.5 ms | 15x faster per thumbnail |
| Main Thread Lockup | 11,200 ms (total freeze) | 0 ms (60 FPS fluid response) | Completely eliminated |
| Reopen Modal Latency | ~800 ms | < 200 ms | Instantaneous from cache |
| Publication Insertion Fidelity | 130px print resolution | 130px print resolution | 100% full print resolution maintained |
π§ͺ Verification & Automated Testing
All updates were validated with an automated Playwright test suite (test_wordart_v520.py):
| Test / Check | Target | Result | Details |
|---|---|---|---|
| Cold Modal Launch Latency | showBetaWordArtModal() |
Passed | Modal opens and renders visible cards in < 250 ms |
| DOM Card Element Count | #beta-wa-grid .beta-wa-card |
Passed | Exactly 500 cards instantiated in DOM |
| Initial Visible Card Generation | [data-rendered="true"] |
Passed | 51 cards rendered initially (viewport + 250px buffer); remainder deferred |
| Preview PNG Data Integrity | card img[src] |
Passed | Valid base64 PNG data URL generated and displayed |
| Viewport Lazy Loading Scroll | Scroll to style [#200] | Passed | Dynamically triggered render upon scrolling into view |
| High-Resolution Insertion | Document canvas #paper |
Passed | Style 7 inserted with custom text; PNG payload > 230 KB (full print resolution) |
| Reopening & Cache Hit Latency | Second modal open | Passed | Reopened in < 200 ms with 130 cached styles retrieved at 0.00 ms |
| JavaScript Console Health | Browser runtime | Passed | 0 JavaScript errors or unhandled exceptions |
β Checklist Completed
- [x]
elements/wordart/beta-wordart.js: Replaced eager 500-card generation loop with Viewport Lazy Loading viaIntersectionObserver(with 250px lookahead margin). - [x]
elements/wordart/beta-wordart.js: Implemented thumbnail canvas downscaling (isPreview = true) ingenerateWordArtPNG, dropping PNG Deflate encoding from ~20ms to ~1.2ms per card. - [x]
elements/wordart/beta-wordart.js: Enabled{ willReadFrequently: true }on canvas 2D rendering contexts to accelerate pixel readbacks during trimming. - [x]
elements/wordart/beta-wordart.js: Built in-memory preview cache (window._betaWAPreviewCache) ensuring 0.00ms instantaneous retrieval for revisited styles and dialog reopens. - [x]
elements/wordart/beta-wordart.js: Implemented progressive idle pre-warming queue usingrequestIdleCallbackto smoothly prepare off-screen styles without frame drops. - [x]
elements/wordart/beta-wordart.js: Added polished CSS skeleton shimmer placeholders with style number badges while previews render. - [x]
elements/wordart/beta-wordart.js: Preserved full 130px print resolution image generation for document canvas insertion when clicking OK. - [x]
index.html: Bumped all 78 script, stylesheet, and asset cachebusters from?v=5.1.13to?v=5.2.0. - [x]
sw.js: Bumped Service Worker cache name toopen-publisher-v5-2-0. - [x]
extensions/pwa-install.js: Bumped Service Worker registration cachebuster tosw.js?v=5.2.0. - [x]
ui/dashboard.js: Bumped template index fetch cachebuster to?v=5.2.0. - [x]
extensions/geo-defense.js: Updated version header comment to(v5.2.0). - [x]
README.md: Updated Linux run script installer command toopenpublisher-5.2.x-linux.run. - [x] Automated Verification: Executed Playwright test suite passing all performance, lazy loading, scrolling, and high-resolution insertion checks with 0 errors.
π Version 5.2.0 - Open Publisher