perf: throttle OG image generation — nice 19 + 50ms sleep between renders

This commit is contained in:
Davide Scaini
2026-05-24 19:02:08 +02:00
parent b827792d16
commit c9b544ab55
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -2,6 +2,7 @@
from __future__ import annotations
import logging
import os
import shutil
import subprocess
import threading
@@ -102,6 +103,7 @@ def _site_rebuild_worker() -> None:
"--www-root", _webroot],
capture_output=True,
text=True,
preexec_fn=lambda: os.nice(19),
)
if og.returncode != 0:
log.error("site-rebuild: og-images failed (rc=%d):\n%s\n%s",