summaryrefslogtreecommitdiffstats
path: root/tests/manual/textrendering/codeeditor/codeeditor.cpp
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2024-02-01 11:50:25 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-07 15:10:29 +0000
commit44dc38ebc9fa407565ec1699bdbb1f97ffd13f1c (patch)
tree98c7e683744a5e5aed5489625299393c8eeb7c73 /tests/manual/textrendering/codeeditor/codeeditor.cpp
parent635be3cdf1b65da752e61e6ddeb5541670324e37 (diff)
QDataStream::readBytes(): make the growth of the buffer geometric
The algorithm tries to allocate the memory using 1 Mb blocks. When the input data is large, this results in a lot of reallocations, which is slow and inefficient. This patch modifies the algorithm in such way that the allocation size increases at each step, resulting in geometric growth of the buffer. Pick-to: 6.6 6.5 Change-Id: I071df68d51ba1dbd8b2eb5f94eb078a33223505f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit a1bfac287ee5d3719646d68dc91dc8e8e4cec04e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/manual/textrendering/codeeditor/codeeditor.cpp')
0 files changed, 0 insertions, 0 deletions