1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +00:00

add mupdf perf_counters

This commit is contained in:
Alex Xu
2025-07-20 09:01:38 -07:00
parent 8f08c63f4e
commit 2f03119926

View File

@@ -794,10 +794,13 @@ def mupdf_pdf_process_pages_parallel(filename, output_dir, target_height):
print("Starting %i processes for '%s'." % (cpu, filename))
try:
start = perf_counter()
with Pool() as pool:
results = pool.map(
render_page if render else extract_page, vectors
)
end = perf_counter()
print(f"MuPDF: {end - start} sec")
except Exception as e:
raise UserWarning(f"Error while processing PDF pages: {e}")