1ca7ac128d
For large documents we create and destroy a large number of non-poolable SfxPoolItems, which get inserted into and removed from a vector. Unfortunately the performance of this (depending on pattern) is O(N) and this insert/remove/extend pattern can happen per text span we insert. This patch makes this O(const) via a hash. This gives a 5x speedup for the above bug; 176s to 34s or so, and moves the remaining performance issues elsewhere. Unfortunately, we have to retain the ordered array to keep the binary file format code (used for editeng cut-and-paste) in place, so have to keep both a hash, and an array, and a list around for free slots. cf. fdo#79851 where there is a start at removing that. This wastes space; but not that much - for a large open document collection we have O(100's) of SfxItemPools, and O(1000's) of SfxPoolItemArray_Impls; having fixed fdo#79851 we can consolidate this. Add skeletal unit test; translate several German comments; remove un-necessary include. Change-Id: Ie0de32b1a29217560c5591c71a6cd4e26d39a531
36 lines
883 B
Makefile
36 lines
883 B
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
|
|
$(eval $(call gb_CppunitTest_CppunitTest,svl_itempool))
|
|
|
|
$(eval $(call gb_CppunitTest_use_external,svl_itempool,boost_headers))
|
|
|
|
$(eval $(call gb_CppunitTest_use_api,svl_itempool, \
|
|
offapi \
|
|
udkapi \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_add_exception_objects,svl_itempool, \
|
|
svl/qa/unit/items/test_itempool \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_libraries,svl_itempool, \
|
|
svl \
|
|
comphelper \
|
|
sal \
|
|
cppu \
|
|
cppuhelper \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_set_include,svl_itempool,\
|
|
-I$(SRCDIR)/svl/source/inc \
|
|
$$(INCLUDE) \
|
|
))
|
|
|
|
# vim: set noet sw=4 ts=4:
|