Bug 47636 - Extremely slow display with font fallback
Summary: Extremely slow display with font fallback
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Caolán McNamara
URL:
Whiteboard: target:3.7.0 target:3.5.5 target:3.6....
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-03-21 03:16 UTC by Mahendra Tallur
Modified: 2023-01-27 09:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Document containing the same bulleted list element pasted a several time, that is pretty slow to scroll into (11.56 KB, application/vnd.oasis.opendocument.text)
2012-03-21 03:16 UTC, Mahendra Tallur
Details
make demo bigger so slowdown is easier for me to see (20.45 KB, application/vnd.oasis.opendocument.text)
2012-06-20 03:55 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mahendra Tallur 2012-03-21 03:16:51 UTC
Created attachment 58800 [details]
Document containing the same bulleted list element pasted a several time, that is pretty slow to scroll into

Hi ! 

Here's an issue that arose with LibreOffice 3.5.0 and is still in Libo 3.5.1. It's 100% reproducible under Arch Linux or Ubuntu 12.04 beta / daily.

A document I used to work on under Libo 3.4.x is now extremely slow to scroll. I figured out that the behaviour could be obtained when copying / pasting one bulleted list element to a blank file.


When pasting this bulleted list element a couple of times onto a page, and trying to scroll, display is very slow. I attached a test case (not the whole original file), but the latter is even slower but contains some personal pieces of information. I can send it privately if needed.

Test configuration : Core2Duo 3 GHz, Nvidia 9800 + prioprietary drivers. Issues occurs also with the Nouveau driver.


Thanks again to everyone involved, best regards,
Mahen
Comment 1 sasha.libreoffice 2012-06-14 02:21:00 UTC
Thanks for bugreport
reproduced in 3.5.4 on Fedora 64 bit, KDE, CPU Core2Duo 1.8 GHz, Intel video

Not reproduced in 3.3.4 , therefore regression
Comment 2 Michael Meeks 2012-06-14 02:32:45 UTC
Hi Caolan - any thoughts if this is a duplicate of your speedup work ? :-)
Comment 3 Caolán McNamara 2012-06-18 07:44:16 UTC
"reproduced in 3.5.4". Trying my 3.5.4 on Fedora 17 it doesn't seem obviously slow. But maybe I've just got a sufficiently fast computer that I don't notice.

There's a chance that this is a duplicate of bug 48932 (http://cgit.freedesktop.org/libreoffice/core/commit/?id=4bc06051d1bf484a6f98186f0a2d168b3d98b9cc) in which case 3.6.0 beta would be fast. Can someone who can reproduce this on 3.5.X try 3.6.0beta and see if its still there ?

If it is still there does toggling off spellchecking make a difference ? And/or toggling on read-only.
Comment 4 sasha.libreoffice 2012-06-18 23:41:33 UTC
in 3.6 beta 1 on Fedora 64 bit also slow
Comment 5 Caolán McNamara 2012-06-19 07:04:07 UTC
hmm, if I make the example much longer I can get a pretty sluggish document. To try and make sure I don't fix a different problem can I get the following...

a) Load the doc and go to the top of the first page. Hold down the page down button and stopwatch time how many seconds does it take before you hit the end of the last page ?
b) Now ctrl+a (to select all). Format->character and select "Liberation Sans" to change all the text to that font. Now go to the top of the first page. Hold down the page down button and stopwatch time how many seconds does it take before you hit the end of the last page ?

i.e. does changing the font to "Liberation Sans" make it much faster
Comment 6 sasha.libreoffice 2012-06-20 00:06:35 UTC
With "Liberation Sans" 3.5 and 3.6 working correctly
Comment 7 Caolán McNamara 2012-06-20 00:58:06 UTC
ok, so its fontconfig font substitution is too slow, so we need to cache the results. But cache this time on the full set of attributes so we don't get things wrong as in bug #41556
Comment 8 Michael Meeks 2012-06-20 01:10:13 UTC
so - I guess this is fundamentally a dup of bug#44719 too then (that is a MAB).
Comment 9 Caolán McNamara 2012-06-20 03:13:57 UTC
possibly/probably. I'll fill out a "got to key off all attributes" implementation first and we can see then if it makes a difference to both reports.
Comment 10 Caolán McNamara 2012-06-20 03:55:58 UTC
Created attachment 63259 [details]
make demo bigger so slowdown is easier for me to see
Comment 11 Not Assigned 2012-06-20 04:10:17 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c023fd645c8b83637ffcde4055886b2e4f94393

Resolves: fdo#47636 cache fontconfig font substitutions
Comment 12 Caolán McNamara 2012-06-20 04:20:09 UTC
The above takes scrolling through the larger example by holding down the page down button from 24+ to 6 seconds for me. Hopefully I'm fixing the original bug report here.
Comment 13 sasha.libreoffice 2012-06-20 05:13:58 UTC
Thanks for fixing this bug
Comment 14 Not Assigned 2012-06-25 02:20:55 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=eaf9cbd403f375f9b69e1c7ed8503d3bc23bcc6e&g=libreoffice-3-5

Resolves: fdo#47636 cache fontconfig font substitutions


It will be available in LibreOffice 3.5.6.
Comment 15 Not Assigned 2012-06-25 02:37:46 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=304bb8386cef389c82e437f387576c4cf436de48&g=libreoffice-3-6

Resolves: fdo#47636 cache fontconfig font substitutions


It will be available in LibreOffice 3.6.
Comment 16 Not Assigned 2012-06-25 02:49:34 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-5-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d122b0f592aaa8af00695109ce2a71f6d8807a96&g=libreoffice-3-5-5

Resolves: fdo#47636 cache fontconfig font substitutions


It will be available already in LibreOffice 3.5.5.