diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-31 10:22:28 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-31 10:57:58 +0100 |
commit | 997055f50db39557425c9da58bcd3f01a8584676 (patch) | |
tree | fe281896b6db3f1ba42724c4b42ef1d7fc099496 /config_host | |
parent | bf4aa9172a906353251b39bd4d3c27f7f30efee7 (diff) |
SwDBManager::MergeMailFiles: set unique fly names at the end of the merge
When generating a unique fly name, we have to iterate over all the
existing flys to find out what's the first not used one, so doing this
for every new fly inserted by mail merge is O(n^2).
During import, we already skip this and only do it once at the end of
the import, which is O(n).
Fix the performance problem by skipping the unique fly name generating
when we produce a combined mail merge document as well, and just
generate them once the mail merge is complete.
For a test document having 12 text frames and 2000 mail merge records,
the times for css::text::MailMerge::execute() is 9m37.330s -> 8m18.811s.
Change-Id: Idfa8e9fe3acc93f1138f5bb12c2419c1492f8ff1
Diffstat (limited to 'config_host')
0 files changed, 0 insertions, 0 deletions