mirror of
https://github.com/ciromattia/kcc
synced 2025-12-19 20:51:45 +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))
|
print("Starting %i processes for '%s'." % (cpu, filename))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
start = perf_counter()
|
||||||
with Pool() as pool:
|
with Pool() as pool:
|
||||||
results = pool.map(
|
results = pool.map(
|
||||||
render_page if render else extract_page, vectors
|
render_page if render else extract_page, vectors
|
||||||
)
|
)
|
||||||
|
end = perf_counter()
|
||||||
|
print(f"MuPDF: {end - start} sec")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise UserWarning(f"Error while processing PDF pages: {e}")
|
raise UserWarning(f"Error while processing PDF pages: {e}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user