fix: reduce max dither dimension to 512px for CF timeout compliance
1024px still took 35s for error diffusion. 512px should be ~4x faster. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f3684c1467
commit
ef696f498a
|
|
@ -15,7 +15,7 @@ from app.schemas.dither import DitherAlgorithm, PaletteMode
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# Max dimension for dithering input — keeps processing under Cloudflare timeout
|
# Max dimension for dithering input — keeps processing under Cloudflare timeout
|
||||||
_MAX_DITHER_DIM = 1024
|
_MAX_DITHER_DIM = 512
|
||||||
|
|
||||||
# In-memory cache: sha256(slug+params) → (png_bytes, metadata)
|
# In-memory cache: sha256(slug+params) → (png_bytes, metadata)
|
||||||
_MAX_CACHE = 200
|
_MAX_CACHE = 200
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue