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
@@ -13,6 +13,7 @@ from __future__ import annotations
import argparse
import json
import sys
import time
from pathlib import Path
@@ -58,6 +59,7 @@ def generate_all(data_dir: Path, www_root: Path) -> None:
out_path.write_bytes(png)
generated += 1
u_gen += 1
time.sleep(0.05)
except Exception as exc:
errors += 1
u_err += 1