diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-04-11 17:55:00 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-11 17:55:00 +0000 |
commit | 7b77dfc9aafb423e6204dd5433699cfd787147b3 (patch) | |
tree | fd8e728f993718385e1fc1d33942577bf1c4c1a2 /xfa/fxfa | |
parent | 63c5fa9cf2250dcd91dd88d8233c0d9d93b1d917 (diff) | |
download | pdfium-7b77dfc9aafb423e6204dd5433699cfd787147b3.tar.xz |
Reserve space to reduce memory operations while encoding barcode
In the test case from the bug, the majority of the time is being spent
resizing Widestring internal buffers, since += is being called in a
tight loop. Since the size of the input being mutated and stored is
known, this CL reserves the space before hand to lower thrashing. This
substantially improves runtime of this test case locally.
BUG=chromium:802242
Change-Id: I5176dabc94634b4d6bc3e9425fe6469a5bf35a41
Reviewed-on: https://pdfium-review.googlesource.com/30190
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa')
0 files changed, 0 insertions, 0 deletions