Bug 77346 - FORMATTING: Calc becomes slow after selecting cells and activating font chooser with previews enabled (summary: comment 29)
Summary: FORMATTING: Calc becomes slow after selecting cells and activating font choos...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
Whiteboard: BSA
Keywords: bibisected, bisected, regression
Depends on:
Reported: 2014-04-11 22:22 UTC by Ryan Tandy
Modified: 2017-12-27 21:27 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:

Test file (41.31 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-01-20 04:07 UTC, Matthew Francis
Video capture from (2.50 MB, video/mp4)
2015-01-20 06:04 UTC, Matthew Francis

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Tandy 2014-04-11 22:22:49 UTC
Problem description: 

Since 4.2, Calc becomes very slow after selecting some cells and activating the font chooser (for example to pick a font from the dropdown, or to type a font name). Verified on 4.2.3~rc3 under Ubuntu 12.04, Ubuntu 14.04, and Windows 7. Not tested on master yet, will do as soon as I have time.

The effect increases with the size of the spreadsheet and the number of cells selected. In a spreadsheet with 200 rows and 15 columns, after doing Select All and opening the font dropdown, any operation like moving the cursor to another cell or selecting some rows makes Calc stop responding (taking 100% cpu) for seconds or even minutes. In a 26x26 spreadsheet (just a-z in rows and columns) it's less severe but still noticeable.

Changing the font size doesn't trigger it.

If I disable "Show preview of fonts" (Options - LibreOffice - View), it doesn't happen any more after quitting Calc and starting it again. (The option is enabled by default.)

Bibisect points to bcc51fb2ebdf77a1cc089857775fd742085b45b6 ("add support for in-place style preview") as the first bad commit.
Operating System: Ubuntu
Version: release
Comment 1 yagolf 2014-04-17 13:29:30 UTC
I can confirm this bug also on LibreOffice under Windows 8.1 and Ubuntu Gnome 13.04

If I may, I'm of the opinion that the problem permeates deeper than just fonts formatting because doing about anything that involves Select > All slows down Calc to the point where it is becoming questionable whether it's really ready for production.
Comment 2 Ryan Tandy 2014-05-06 22:42:45 UTC
Since yagolf confirmed the bug (thanks!), changing from UNCONFIRMED to NEW.
Comment 3 Kohei Yoshida 2014-05-08 12:59:31 UTC
This needs to be re-verified with a more recent 4.2 build.
Comment 4 Ryan Tandy 2014-05-08 15:21:16 UTC
Hi Kohei,

The bug exists also in 4.2.4 RC2.
Comment 5 Kohei Yoshida 2014-05-08 19:45:30 UTC
Try daily build.  Release build is not to be used for QA purposes.
Comment 6 Kohei Yoshida 2014-05-08 19:46:05 UTC
Even better would be the latest from the 4.2 branch.
Comment 7 Ryan Tandy 2014-05-08 22:12:58 UTC
Confirmed with libreoffice-4.2 daily build: libreoffice-4-2~2014-05-08_00.21.04

Seems to be fixed in master daily build: master~2014-05-07_23.36.18

I will try to find the responsible commit. There is no bibisect repository for 4.3 yet, right?
Comment 8 Kohei Yoshida 2014-05-09 00:45:00 UTC
Huh. Weird. I did backport (what I think to be) the fix to 4.2 a week or so ago.  As far as Calc is concerned, there isn't much difference between master and 4.2 branches.
Comment 9 Kohei Yoshida 2014-05-09 01:01:47 UTC
(In reply to comment #7)

> I will try to find the responsible commit. There is no bibisect repository
> for 4.3 yet, right?

Actually I don't know enough about bibisect to answer this.  Sorry.  Joel and Bjoern may know.
Comment 10 Kohei Yoshida 2014-05-09 01:07:52 UTC
This commit is what I suspected to be the fix.


and it's already in the 4.2 branch.
Comment 11 Ryan Tandy 2014-05-12 17:24:10 UTC
Tested again with:


Actually, I don't think it's fixed, either on libreoffice-4-2 or on master. I don't know why I wrote that before.

Easy to reproduce:

1. put some text in the first cell and copy-paste that to some rows and columns (e.g. 50x50)
2. select all, and change the font
3. scroll up and down

With style previews enabled, after the font has been changed, scrolling is slow and there's a visible delay while cells are redrawn.

With style previews disabled, scrolling is fast.
Comment 12 Ryan Tandy 2014-05-12 17:45:13 UTC
Reading #74555, I really do expect this to be a duplicate of it. It sounds exactly the same. But I checked carefully that I'm testing with a build that includes that change, and I'm definitely still experiencing the problem like I wrote in my previous comment.
Comment 13 Kohei Yoshida 2014-05-12 18:28:02 UTC
Ok.  Then this is perhaps something else.
Comment 14 gitzu 2014-06-16 06:04:32 UTC
(In reply to comment #13)
> Ok.  Then this is perhaps something else.

Yes, in versión still persists.
Comment 15 gitzu 2014-06-16 06:27:07 UTC
Another way to reproduce it:
Edit->Select All
Ctrl-M  (Format->Clean Format)
Then arrow keys move slowly
Comment 16 gitzu 2014-06-16 06:42:59 UTC
I hope this help to  Kohei Yoshida in some way:
How recuperate speed after change font in all cells:
Simply go to combo box to change font and next press escape (with nothing selected)
Calc then return to full speed!
Comment 17 gitzu 2014-06-20 15:33:57 UTC
Still in libreoficce 4.3.0 RC1.
I suppose it's a flag not checked  when select all is applicated, because change font without select cells fix the speed of calc.
Comment 18 tommy27 2014-06-24 05:27:28 UTC
please take a look at Bug 80429 - Calc slows down when you select all cells and change font

it looks a very similar issue which I reproduced under Win7x64 in 4.2.x but not in
Build ID: 52613b9b632721ebb5167a4d9529c242a0b907da
TinderBox: Win-x86@42, Branch:libreoffice-4-3, Time: 2014-06-23_07:41:56

can you retest with a more recent 4.3 build?
Comment 19 Cor Nouws 2014-06-25 10:51:32 UTC
The original report was against Calc < 4.2.5.x
I think this is just OK in 4.2.5 ad 4.3.0
See https://bugs.freedesktop.org/show_bug.cgi?id=80356#c2
Comment 20 tommy27 2014-06-25 11:04:29 UTC
Ok. let's mark this as RESOLVED WORKSFORME.

feel free to reopen if somebody still reproduces this on recent 4.2.x or 4.3.x builds
Comment 21 gitzu 2014-06-25 12:04:47 UTC
I want to try if really the bug was corrected in recent versions, but Windows 
installers in Nightly Builds don't install.
Example:  libo-43~2014-06-25_00.02.29_LibreOfficeDev_4.
Comment 22 tommy27 2014-06-25 12:57:59 UTC
bad news... please open a new report about that 4.3.x install issue
Comment 23 Ryan Tandy 2014-07-02 19:42:31 UTC
(In reply to comment #20)
> feel free to reopen if somebody still reproduces this on recent 4.2.x or
> 4.3.x builds

Reopening. Reproduced with:

Build ID: 32eddb3f48fcea0a052401a8a5dc075c7847f1c5
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-2, Time: 2014-07-02_08:19:58

Build ID: c482a2f87ef2a38d249c276924e071bbc714a07f
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-3, Time: 2014-07-01_23:55:39

on Ubuntu 14.04 64-bit.

(In reply to comment #19)
> See https://bugs.freedesktop.org/show_bug.cgi?id=80356#c2

I agree with that comment. It is better than it was but there is still a noticeable loss of performance after opening the font chooser, when previews are enabled.

I think bug 80356 is a duplicate of this one (or vice versa), and both are a continuation of the issue that was partly fixed in bug 74555 and still partly exists.
Comment 24 Dmitry 2014-10-01 13:56:23 UTC
confirm this bug.

tested with LibreOffice_4.2.4_Win_x86.msi on windows xp,
libreoffice-bin- and libreoffice-bin- on gentoo linux.

disable "Show preview of fonts" solves problem.
Comment 25 Joel Madero 2014-11-06 22:50:02 UTC
Needs independent confirmation from QA team - moving to UNCONFIRMED. Thanks all
Comment 26 Cor Nouws 2014-11-07 13:41:11 UTC
On Linux, Ubuntu, 32 bits,, 4.4.0.alpha1
font preview activated

create a spreadsheet
select A1:T20000
or A1:Y20000

open font drop down
choose font
close drop down, open and chose another front
and some more

I experience no delay..
Comment 27 gitzu 2014-11-07 20:08:33 UTC
On Windows 7, 32 bits
font preview activated

create a spreadsheet
select A1:T20000  *** FILL IT *** with aleatory content

open font drop down
choose font

I experience delay..
Comment 28 Matthew Francis 2015-01-20 04:07:26 UTC
Created attachment 112513 [details]
Test file
Comment 29 Matthew Francis 2015-01-20 05:57:15 UTC
There is still an issue present in at least and 4.5 master which does appear to date back to the range mentioned in comment 0 (which in the 43all bibisect repo is source-hash-bcc51fb2ebdf77a1cc089857775fd742085b45b6).

Steps to reproduce:
1. Load the file from attachment 112513 [details]
2. Ensure "Tools - Options - LibreOffice - View - Font Lists - Show preview of fonts" is enabled
3. Select All
4. Change to another font

Expected result:
- Interface should be as responsive as before (4) - e.g. scrolling, clicking between cells, selecting a cell range

Actual result:
- Interface is much slower than before. Saving and reloading the file resets the speed to normal
Comment 30 Matthew Francis 2015-01-20 06:04:40 UTC
Created attachment 112516 [details]
Video capture from

The attached video capture shows the observed effect. Note that after font preview is enabled and the font changed, the selection is much less responsive.

This effect is much more pronounced on a dbgutil build of 4.5 master (it hasn't become slower; this just seems to be a side effect of dbgutil)
Comment 31 Matthew Francis 2015-01-20 07:27:44 UTC
commit bcc51fb2ebdf77a1cc089857775fd742085b45b6
Building from source confirms that the slowdown started at the below commit

Adding Cc: to nopower@novell.com; Could you possibly take a look at this? Thanks

Author: Noel Power <noel.power@suse.com>
Date:   Thu Aug 29 17:15:33 2013 +0100

    add support for in-place style preview
    selecting a style in the styles dialog ( without double clicking )
    will apply the style to the currently selected cell(s) You can
    with the keys navigate to other styles and they in turn will
    also be applied. Preview will end when you click back onto the
    *FIXME* - the styles dialog isn't really suitable for previewing, a
    new dialog ( possibly in the toolbar ) might be nicer ( see Excel )
    *FIXME* - when there is a multiple selection the highlight colour
    (applied as a transparent overlay) is most annoying ( and is mixed
    with any background colour applied if part of a style )
    see ( ScGridWindow::UpdateSelectionOverlay() ) However my puny
    attempts to make the selection use a transparent colour made all the
    borders of the selected cells dissappear. I guess maybe a box/border
     around each selected cell ( or group of cells ) would also work
    but I didn't try that
    Change-Id: I0950e79085ffb75f60ee961835665df0c230172f
Comment 32 Igor 2015-09-10 14:33:36 UTC
Same thing happens on mac os x 10. When i select all cells on sheet with 1000 rows and 15 colomns and try to change font, even if didn't save any changes, Calc becomes very slow and it's becomes impossible to continue work.
Comment 33 Igor 2015-09-10 14:35:48 UTC
version LO reply to Igor from comment #32)
> Same thing happens on mac os x 10. When i select all cells on sheet with
> 1000 rows and 15 colomns and try to change font, even if didn't save any
> changes, Calc becomes very slow and it's becomes impossible to continue work.
Comment 34 Robinson Tryon (qubit) 2015-12-13 11:16:19 UTC Comment hidden (obsolete)
Comment 35 Xisco Faulí 2017-09-29 08:52:19 UTC Comment hidden (obsolete)
Comment 36 Ryan Tandy 2017-12-16 20:18:46 UTC

I tested this again with:

- Calc on Debian 9.3 (stretch)
- Calc on Windows 10

and following the instructions in comment #23.

The behaviour does seem to have changed since I originally reported the bug. I no longer experience a lag of several seconds. However, Calc does still become noticeably less responsive after Select All (Ctrl-A) and changing the font.

It's easy to see if you use the arrow keys to move around: immediately after opening the document, arrow key navigation is quite responsive; but after changing the font on the entire document, there is noticeable lag in redrawing the row/column indicators.

Even though it's much better than it used to be, as the steps to reproduce still result in a visible change in UI performance, I'm leaving the status as open for now.
Comment 37 Cor Nouws 2017-12-27 21:27:12 UTC
Doing a select all (range with data is A1:O351) and then font list, works instantaneous in Version:
Build ID: a9b202a6b7000e7af34f2a639ca207122a3968bf
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-12-26_23:09:36
Locale: nl-NL (nl_NL.UTF-8); Calc: group threaded