Created attachment 175026 [details] A sample file with a query to return a 140000-char string The attachment is rather a corner case, to demonstrate the problem. It contains a table in Firebird DB with 6-digit integers, and a query to combine them into a single semicolon-delimited 140000-character string. Trying to execute the query performs the SQL instantly, but then hangs ~forever in TextEngine::CreateLines. (So this is not a Base-related problem; I assume it would hit any such case, and I seem to remember to also see it when testing Calc's cell data limit.) Noel: possibly you could take a look and apply your magic here? :)
Created attachment 175038 [details] perf flamegraph Here's a Flamegraph retrieved on pc Debian x86-64 with master sources updated today + gen rendering. BTW, after about 30seconds, the result of query didn't appear (Ryzen 5 2600, 32 GB)
Encuentra Mesa Redonda Blanca - Muebles para el Hogar en MercadoLibre.com.mx! Entre y conozca nuestras increíbles ofertas y promociones. https://lamundial.net/mesas-de-centro-redondas-blancas/
Noel Grandin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/95cc31f15712bcd2b9829a4f9708374647af6e74 tdf#144513 improve perf when breaking long lines It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I have another patch which tries to improve this https://gerrit.libreoffice.org/c/core/+/124212 but that is currently a hack until harfbuzz gains some new API https://github.com/harfbuzz/harfbuzz/issues/3265