This repository was archived by the owner on Apr 11, 2025. It is now read-only.
Commit db01b68
committed
[MRG] Utils: optimise get_page_layout
Since the existing code overwrites `layout` and `dim` in each iteration,
it is much more efficient to simply return the `layout` and `dim` of the
first page.
I have tested the difference with a 455 page pdf and the optimisation
reduces the time spent from 50 to 5 seconds.
Signed-off-by: Karl Bonde Torp <k.torp@samsung.com>1 parent 644bbe7 commit db01b68
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
889 | 889 | | |
890 | 890 | | |
891 | 891 | | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
898 | 900 | | |
899 | 901 | | |
900 | 902 | | |
| |||
0 commit comments