4.3 lifts the 64k paragraph limit; unfortunately the long paragraphs take a long time to format (at least on Linux, with the harfbuzz backend).
callgrind says >95% of CPU time goes into vcl::ScriptRun::next(), called from HbLayoutEngine::Layout(). there is already a patch by mjayfrancis in gerrit to substantially accelerate ScriptRun::next() but it was abandoned: https://gerrit.libreoffice.org/#/c/11775/ i've done some callgrind profiling and have 3 potential fixes of my own, one of which is an obvious 50% win, the second is a complete waste of 1.5 days since at last i learned writer was already doing something very similar itself, and the third almost eliminates the other 50% at the cost of parentheses script correctness.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7fde44c85620f8079bc4863fe3f7ea1f69a0f88c tdf#89666: vcl: speed up HbLayoutEngine line layout for large paragraphs It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-4-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=623f16d7a47020600e2b4ba03aa6a617545b0d93&h=libreoffice-4-3 tdf#89666: vcl: speed up HbLayoutEngine line layout for large paragraphs It will be available in 4.3.7. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8a58579a35bb275c985ff0fd412c92f10cd8a085&h=libreoffice-4-4 tdf#89666: vcl: speed up HbLayoutEngine line layout for large paragraphs It will be available in 4.4.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1efe5fe38031f7bc23150c35e4c68940621a1d5b tdf#89666: vcl: speed up HbLayoutEngine with cache in SwTxtFormatInfo It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Norbert Thiebaud committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3c6fd5a59b08cec8705a31d17a60204acf6b7173 Revert "tdf#89666: vcl: speed up HbLayoutEngine with cache in SwTxtFormatInfo" It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b9782a2b59428e1bc398b5f3a895785a072c93b6 tdf#89666: vcl: speed up HbLayoutEngine with cache in SwTxtFormatInfo It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
See also https://bugs.documentfoundation.org/show_bug.cgi?id=92064 (the attached example might be relevant to test)
Migrating Whiteboard tags to Keywords: (perf)
Hello, Is this bug fixed? If so, could you please close it as RESOLVED FIXED?
guess this can be called fixed now there was some further commit to optimize ScriptRun class: commit b9880e49e5fbae377eca82e60b88cbbdca8bd5d2 Author: Noel Grandin <noel@peralex.com> AuthorDate: Wed Mar 11 13:55:51 2015 +0200 Speed up ScriptRun::getPairIndex Noted as a hot spot in the callgrind of test-files/loperf/091_fdo#39372.odt The idea for the lookup tables is credited to mjayfrancis. This takes it from 1.8 billion instructions to 1.1 billion instructions. This change has been submitted upstream (along with other changes to these source files that have not yet been pushed there) in ICU ticket: http://bugs.icu-project.org/trac/ticket/11577