summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorOlli Parviainen <oparviai@iki.fi>2018-12-25 20:25:32 +0000
committerOlli Parviainen <oparviai@iki.fi>2018-12-26 07:07:11 +0000
commit1bf8826edaecb5485ede616b17e6498754507d93 (patch)
tree16421b3aa22a145dc41163075f12bb1330cd8f70 /src/style.cpp
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
downloadinkscape-1bf8826edaecb5485ede616b17e6498754507d93.tar.gz
inkscape-1bf8826edaecb5485ede616b17e6498754507d93.zip
Speed up de-selection by switching to more efficient intrusive list structure
De-selection were slow for large path sets because disposal of SPCanvasItems needed to perform linear search through SPCanvasGroup::items linked list for every disposed item separately, meaning O(N^2) operation complexity. For large path sets this became excessively slow. To speed up the disposal operation, changed SPCanvasGroup::items from std::list to boost::intrusive::list that allows getting a linked list position iterator directly from SPCanvasItem pointer in constant time. This reduces the disposal operation complexity from O(N^2) to O(N). Testing with a large path set consisting of >100k items, de-selection became tens of times faster. Signed-off-by: Olli Parviainen <oparviai@iki.fi>
Diffstat (limited to 'src/style.cpp')
0 files changed, 0 insertions, 0 deletions