Commit 932e0ba
authored
The previous `if` condition was inefficient and should have been written with an `and` This resulted in a performance gap.
cProfile timing of `export_hocr_string()` on the same document
Before
```
143598720 function calls (129111346 primitive calls) in 44.487 seconds
```
After
```
97883150 function calls (88084552 primitive calls) in 30.235 seconds
```
Fixes #312 🦕
1 parent d6f7de1 commit 932e0ba
File tree
1 file changed
+5
-3
lines changed- packages/google-cloud-documentai-toolbox/google/cloud/documentai_toolbox/wrappers
1 file changed
+5
-3
lines changedLines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
364 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
365 | 367 | | |
366 | 368 | | |
367 | 369 | | |
| |||
0 commit comments