mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-19 00:17:32 +00:00
Tiles are drawn on the thread pool, and the first tile that meets a fold works out the fold's order while the others that need it wait. The order's sort was shared with the pool, so while the working thread waited for its halves the pool could hand it another folded tile, which then waited for the order on the same thread: the warp never finished. It needed some tiles folding and others not, and showed about once in ten 24 MP warps on 16 threads. The sort now runs on the working thread alone. It costs nothing measurable: a 24 MP fold in stacking order takes 0.28 s, as before. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZbgszHyuEuWAzxaamteuU