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:
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user