-
Notifications
You must be signed in to change notification settings - Fork 360
Camelot speed up #427
Comments
I've checked your suggestion and studied through the code and looks like its only relevant for "Stream" flavor, with Lattice - the provided code snippets are not even used ;( |
I've noticed a similar issue.
=> so that's O(n^2) calls to While refactoring Bottom line: once the Pull Request for the new hybrid network is merged, this might no longer be needed. |
Is there any update on that? I am currently also using |
update? |
While using camelot to extract tables from pdfs. I noticed it's really slow. I profiled the code and turns out that %60 of the bottleneck is from
np.isclose
here and here as well as multiple other places in core.py:camelot/camelot/core.py
Line 103 in cd8ac79
camelot/camelot/core.py
Line 67 in cd8ac79
The slowdown makes sense since there is a very big overhead with
np.isclose
if we are dealing with native python floats instead of numpy types.I switched the method to
math.isclose
instead and the processing time was reduced to more than half!I can submit an Pull Request with the changes if the devs agree this is a safe change to make.
Thanks
The text was updated successfully, but these errors were encountered: