diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-04-04 15:49:01 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-04 15:49:01 +0000 |
commit | 3faa382d4feb3c272333f20e16106a5bbc472990 (patch) | |
tree | 272d199d991c7dcf17e7ae97252cb652c21f9240 /xfa/fxbarcode/pdf417/BC_PDF417Compaction.h | |
parent | c80153d94ed0d540c706b7f7bdb993772b2be9f7 (diff) | |
download | pdfium-3faa382d4feb3c272333f20e16106a5bbc472990.tar.xz |
Decrease XML parser buffer size
This CL decreases the m_iXMLPlaneSize in the CFX_XMLSyntaxParser from
32*1024 to 1024 bytes. This plane size is the size of the chunks we read
the XML file in. The issue with having a large plane size is inside the
CFX_SeekableStreamProxy::ReadString we allocate a vector of the
min(planeSize, remaining_bytes). This means, we could potentially be
allocating 32*1024 bytes to read in a single character.
For the test in the attached bug the runtime went from 12s to 25ms.
Bug: chromium:813195
Change-Id: Id57e619b7a118d45e3fed491ad81e86a4b1cacb8
Reviewed-on: https://pdfium-review.googlesource.com/29750
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417Compaction.h')
0 files changed, 0 insertions, 0 deletions