https://bugs.freedesktop.org/show_bug.cgi?id=80823
--- Comment #1 from Jan-Marek Glogowski <glo...@fbihome.de> --- Created attachment 102189 --> https://bugs.freedesktop.org/attachment.cgi?id=102189&action=edit hot spot function tree of a complex, 3000 documents mail merge via UNO. This is from my initial callgrind of a mail merge of 3000 documents with our real, primary document template, where the examples documents from #79067 are based on. The callgrind has 4.5 MB and I don't have a place to store it. Probably someone can offer storage ;-) So the callgrind would "just" be a reference, I can't supply the documents, but it shows the hot spots. The callgrind ran almost a whole weekend. FYI: the document has 19 "special frames", that's why mail merge will stop after 3450 documents (16bit index used for the vector). Me / a collegue will work on a patch for that, but it's currently not our primary concern, as MM produces broken results for various examples documents. Fixes for most are in private/jmux/mailmerge-fixes. There are various patches related to MM perforamnce in private/jmux/sorted-pagedesc+spzfrmfmts = The hot spots = 1. AppendAllObjs This algorithm was probably written for a linked list, where removing the first element is cheap. For vectors it's ridiculously expensive, especially for vectors with 65000 objects... Working fix in private/jmux/sorted-pagedesc+spzfrmfmts 2. lcl_GetUniqueFlyName These code has two problems: 2.1 Creates a lot of temporary OUStrings (billions!) when doing atoi. - Actually most time is spend allocation and freeing the substrings! - Fix 1: directly try to convert the tail. 2.2 Has to check all entries in SpzFrmFmts. Most are invalid. - Fix 2: Sorting this array will help it a lot. - Fix 3: Storing the first hole when deleteing would even speed it up. Broken fix 1 + 2 are in private/jmux/sorted-pagedesc+spzfrmfmts With thsese patches, both hot spots are gone. = TODO = Undo for (vector) lists is implemented by storing the current position. For sorted lists undo has to store the index of the new object. Not really hard to fix, but I need more knowledge of the undo code to finally fix it. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs