Limit number of threads.

This commit is contained in:
Leo Vasanko 2025-08-15 10:17:48 -06:00
parent 97353efffb
commit 21352daf11

View File

@ -92,7 +92,7 @@ def process_image(path, *, maxsize, quality):
# Save as AVIF
imgdata = io.BytesIO()
t_save_start = perf_counter()
img.save(imgdata, format="avif", quality=quality, speed=10)
img.save(imgdata, format="avif", quality=quality, speed=10, max_threads=1)
t_save_end = perf_counter()
ret = imgdata.getvalue()