https://bugs.documentfoundation.org/show_bug.cgi?id=98665

Michael Stahl <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |[email protected],
                   |                            |[email protected],
                   |                            |[email protected]

--- Comment #17 from Michael Stahl <[email protected]> ---
the obvious problem in the callgrind of comment #16 is that
the table styles export is cubic.

SwXTextTables::getByIndex calls SwDoc::GetTableFrameFormatCount,
which does a loop over SwDoc::mpTableFrameFormatTable, then it calls
SwDoc::GetTableFrameFormat, which does another loop over the array.

SwXTextTableStyle::isInUse calls SwXTextTables::getByIndex
in a loop for n/2 times on average, where n is # of tables.

SwXTextCellStyle::isInUse calls SwXTextTableStyle::isInUse
once, and is called once per cell.

so we do about n * n/2 * m just to determine if styles are used,
that's pretty bad.

the SwX*Styles code was apparently added in commit
17f440e7e7f1621edebc58f8be5e85b68ee7dcf4
"GSoC Table Styles, TableStyle isInUse, isUserDefined, mutex fixes"

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to