Bug 132454 - Lots of time spend in SfxBroadcaster after Undo of a deleted sheet
Summary: Lots of time spend in SfxBroadcaster after Undo of a deleted sheet
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Luboš Luňák
URL:
Whiteboard: target:7.1.0 target:7.0.0.1
Keywords: perf
Depends on:
Blocks:
 
Reported: 2020-04-27 11:35 UTC by Telesto
Modified: 2020-07-01 10:33 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
framegraph for undo action (1.51 MB, image/svg+xml)
2020-06-22 11:35 UTC, Xisco Faulí
Details
flamegraph (651.94 KB, image/png)
2020-06-23 06:43 UTC, Noel Grandin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-04-27 11:35:21 UTC
Description:
Lots of time spend in SfxBroadcaster after Undo of a deleted sheet

Steps to Reproduce:
1. Open attachment 154545 [details]
2. Remove FiltrageVent
3. CTRL+Z -> Wait a long time

Actual Results:
SfxBroadcaster::Type takes a long time


Expected Results:
Some optimization possible, maybe?


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: f924658e45f256544e43c3fdb2af9b585d0f0933
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: threaded

also in 
4.4.7.2
Comment 1 Xisco Faulí 2020-06-15 15:14:37 UTC
I killed LibreOffice after 4 minutes

Version: 7.1.0.0.alpha0+
Build ID: 37d5cccceb9f02d60de326f5b1fc5098dc004739
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Julien, would it be possible to have a performance chart for this issue ?
Comment 2 Julien Nabet 2020-06-15 15:20:36 UTC
(In reply to Xisco Faulí from comment #1)
> I killed LibreOffice after 4 minutes
> 
> Version: 7.1.0.0.alpha0+
> Build ID: 37d5cccceb9f02d60de326f5b1fc5098dc004739
> CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
> Locale: en-US (en_US.UTF-8); UI: en-US
> Calc: threaded
> 
> @Julien, would it be possible to have a performance chart for this issue ?

Let's wait first for some feedback on already Flamegraph files provided on other bugtrackers.
Comment 3 Xisco Faulí 2020-06-22 11:35:56 UTC
Created attachment 162303 [details]
framegraph for undo action
Comment 4 Xisco Faulí 2020-06-22 11:36:55 UTC
(In reply to Xisco Faulí from comment #3)
> Created attachment 162303 [details]
> framegraph for undo action

@Noel, I thought you might be interested in this issue
Comment 5 Julien Nabet 2020-06-22 11:39:39 UTC
(In reply to Xisco Faulí from comment #3)
> Created attachment 162303 [details]
> framegraph for undo action

nitpick: it's "Flamegraph" not "Framegraph" since the graph resembles a fire with flames :-)
Comment 6 Xisco Faulí 2020-06-22 11:45:50 UTC
(In reply to Julien Nabet from comment #5)
> (In reply to Xisco Faulí from comment #3)
> > Created attachment 162303 [details]
> > framegraph for undo action
> 
> nitpick: it's "Flamegraph" not "Framegraph" since the graph resembles a fire
> with flames :-)

lol, thanks
Comment 7 Noel Grandin 2020-06-23 06:42:54 UTC
Flamegraph for me looks like attached.

erack - it looks like we are spending all our time detaching and then re-attaching listeners - this looks like something that we would have already solved in calc? Perhaps there is some kind of scoped suppress function we need to use here?
Comment 8 Noel Grandin 2020-06-23 06:43:29 UTC
Created attachment 162331 [details]
flamegraph
Comment 9 Commit Notification 2020-06-24 15:48:57 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/07cda8035c34ca9f8ac3ba911a2b691349665fc7

optimize SvtBroadcaster::Normalize() (tdf#132454)

It will be available in 7.1.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.
Comment 10 Xisco Faulí 2020-06-24 18:11:10 UTC
Undo action takes 2:30 minutes for me now

Version: 7.1.0.0.alpha0+
Build ID: 42bf9bdf3d551eb59604f952204c49f7d7a1e913
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Telesto, what about you ?
Comment 11 Buovjaga 2020-06-24 18:56:14 UTC
With 6.4 it takes at least 6 minutes (was a bit too mind-numbing to observe perfectly).

Master with the commit takes only 20 secs.

Arch Linux 64-bit
Version: 7.1.0.0.alpha0+
Build ID: 090477feb304dd293c8dbf9bf729a3b3a41ae4df
CPU threads: 8; OS: Linux 5.7; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 24 June 2020
Comment 12 Commit Notification 2020-06-24 20:19:51 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/8d68f918686ef390decaafd772e39731bb89469d

optimize SvtBroadcaster::Normalize() (tdf#132454)

It will be available in 7.0.0.1.

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.
Comment 13 Commit Notification 2020-06-25 08:47:04 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/048ee6a997c0fdd4be5821b6edb36dd007479f72

optimize SvtBroadcaster::Normalize() a bit more (tdf#132454)

It will be available in 7.1.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.
Comment 14 Commit Notification 2020-06-26 05:58:44 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/0d7a20d965a2c0ad409f684bf4b7a359c39a61a7

optimize SvtBroadcaster::Normalize() a bit more (tdf#132454)

It will be available in 7.0.0.1.

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.
Comment 15 Commit Notification 2020-06-26 10:01:09 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b0e0ba28dcb69b6d042107f24c961b444eb6793e

optimize SvtBroadcaster::Normalize() even a bit more (tdf#132454)

It will be available in 7.1.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.
Comment 16 Buovjaga 2020-06-26 12:27:25 UTC
With the latest, it is down to only 9,5 seconds for me, so a halving since my comment 11

Arch Linux 64-bit
Version: 7.1.0.0.alpha0+
Build ID: 5d1d29a3bf1c5501cb094b45243ce7fd7918c5cd
CPU threads: 8; OS: Linux 5.7; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 26 June 2020
Comment 17 Commit Notification 2020-06-26 15:51:04 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/69d476ae67ee4b96e5ff3b8d7a2587644c4af97f

optimize SvtBroadcaster::Normalize() even a bit more (tdf#132454)

It will be available in 7.0.0.1.

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.
Comment 18 Commit Notification 2020-07-01 06:32:05 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bde0cc68bd6443c97b4ca061ed7132f478959281

tdf#132454 some more improvements

It will be available in 7.1.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.
Comment 19 Commit Notification 2020-07-01 10:33:49 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/1b857954faf28fe4a63ee81686a5448766c213e7

tdf#132454 some more improvements

It will be available in 7.0.0.1.

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.