Editor › Performance
Is PhotoAIA fast enough for professional work?
PhotoAIA’s architecture is designed for speed — tiled storage, dirty-region recompositing and GPU-based blending — and reproducible engine benchmarks are now published on this page: on a worst-case 4000×3000, 12-layer document, a 500-point brush stroke applies in 36ms and a 256×256 dirty-region recomposite takes 57ms.
Why the architecture is built for speed
- Tile-based storage — the canvas is kept as small fixed-size tiles rather than one flat buffer, so an edit only has to read or write the tiles it actually touches.
- Dirty-region recompositing — every edit computes the narrowest rectangle that could have changed and recomposites only that rectangle through the layer stack, not the whole document.
- GPU compositing — blending and adjustments run as WebGL2 shaders over layer textures instead of per-pixel JavaScript loops, with an automatic 2D canvas fallback when WebGL2 is unavailable.
- Cached composites — layer textures and colour lookup tables are cached and reused across frames where nothing changed.
What is not shipped yet
- Multi-core rendering through Web Workers is on the roadmap, not shipped — today rendering is single-threaded plus the GPU.
- Large, many-layer documents are still being optimised; a cold render of a big document can be slow.
Published benchmarks (engine suite, 2026-07)
Reproducible pure-engine suite (scripts/bench.ts in the repository), median of 5 runs. Fixture: 4000×3000 px, 12 gradient layers with partial alpha — a deliberate worst case where every layer blends on every pixel. Machine: Apple M4, Node 22. Browser numbers differ but track the same ratios.
Optimised this sprint (before/after)
Save compression was fixed at deflate level 6; measurement showed level 3 is 37% faster AND smaller than level 1 (level 6: 7.5s / 5.8MB · level 3: 4.7s / 11.6MB · level 1: 4.9s / 13.4MB). The default is now level 3 — saves on the worst-case document dropped from 7.5s to 4.7s. The remaining big costs (cold CPU flatten, single-threaded save) are exactly the Web-Worker roadmap items above.
Questions
- Are there published PhotoAIA benchmarks?
- Yes — a reproducible engine suite (in the repository as scripts/bench.ts) is published on this page: on a worst-case 12-layer 12MP document, brush strokes apply at ~0.07ms per stamp, a 256×256 dirty-region recomposite takes 57ms, and saving takes 4.7s.
- Does PhotoAIA use the GPU?
- Yes. Layer blending and adjustments run as WebGL2 shaders, with an automatic fallback to a 2D canvas renderer if WebGL2 is unavailable.