unstructured
0f2e7c05 - mem: reduce PaddleOCR rec_batch_num from 6 to 1

Commit
24 days ago
mem: reduce PaddleOCR rec_batch_num from 6 to 1 Paddle's native inference engine allocates 500 MiB memory arena chunks during text recognition, proportional to batch size. With the default rec_batch_num=6, four 500 MiB chunks are allocated simultaneously. Setting rec_batch_num=1 reduces this to a single chunk, cutting peak memory on the PaddleOCR code path by ~1,265 MiB (-42.6%). Latency benchmark (55 text regions, CPU, 5 runs): - rec_batch_num=6: 39.1s +/- 3.5s - rec_batch_num=1: 37.0s +/- 2.0s No throughput regression — on CPU, batch processing is sequential.
Author
Committer
Parents
Loading