summaryrefslogtreecommitdiff
path: root/fxjs/cjs_keyvalue.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-04-04 15:49:01 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-04 15:49:01 +0000
commit3faa382d4feb3c272333f20e16106a5bbc472990 (patch)
tree272d199d991c7dcf17e7ae97252cb652c21f9240 /fxjs/cjs_keyvalue.cpp
parentc80153d94ed0d540c706b7f7bdb993772b2be9f7 (diff)
downloadpdfium-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 'fxjs/cjs_keyvalue.cpp')
0 files changed, 0 insertions, 0 deletions