diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-06-14 19:55:22 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-14 19:55:22 +0000 |
commit | e90469e4c9b22ff912c70ec70392cf607fb1ad57 (patch) | |
tree | 87af6b4e4bedb0ee86ada4bb21f2466a02e50f43 /xfa/fxfa/parser/cxfa_incrementalmerge.cpp | |
parent | bb3d6313f278feee76f5fba17feff3aee65fb928 (diff) | |
download | pdfium-e90469e4c9b22ff912c70ec70392cf607fb1ad57.tar.xz |
[formcalc] Calculate length of string when calling FXSYS_wcstof
When calling the FXSYS_wctof method we currently pass in -1 from
AdvanceForNumber. This tells the method to calculate the string length.
This can be slow for a formcalc string with a lot of numbers.
This CL changes the call to pass in the length of remaining data in the
original string. This takes the MSAN runtime of the case in the linked
bug from ~21seconds to ~500ms. The debug runtime goes from ~2s to
~500ms.
Bug: chromium:846104
Change-Id: Idbd19a728160f35982e21c0d97567fbbeefe667a
Reviewed-on: https://pdfium-review.googlesource.com/35210
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_incrementalmerge.cpp')
0 files changed, 0 insertions, 0 deletions