docling-project / docling-project/docling

Latest version 2.20 Read pdf is very slow

Open
#995 1 comment 0 reactions 0 assignees View on GitHub
performance question triage/close-stale
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Question

...
Tested 2.14.0 and 2.22.0 on the same environment and found it took 5 minutes longer than before.
The use of the same 60M or so pdf files.

`def convert(filepath):
start_time = datetime.now()

print(f"start_time: {start_time} ")
input_doc = Path(filepath)
pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr = True
pipeline_options.ocr_options.use_gpu = True
pipeline_options.do_table_structure = False
pipeline_options.table_structure_options.do_cell_matching = False
pipeline_options.ocr_options = EasyOcrOptions(force_full_page_ocr=False)
settings.debug.profile_pipeline_timings=True

converter = DocumentConverter(
format_options={
InputFormat.PDF: PdfFormatOption(
pipeline_options=pipeline_options,
)
}
)

result = converter.convert(input_doc)
doc = result.document
# print(result.timings)

# print(md.replace('', ''))

end_time = datetime.now()
print(f"end_time: {end_time} ")
print(f"Total processing time: {end_time - start_time}")`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.