Bug 151876 - Slow Chart Render open, cpu spike, and view if data point is more than 1000 data point in Calc
Summary: Slow Chart Render open, cpu spike, and view if data point is more than 1000 d...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Performance
  Show dependency treegraph
 
Reported: 2022-11-03 13:42 UTC by Benyamin Limanto
Modified: 2022-11-13 14:27 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The sample xlsx (348.91 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2022-11-03 13:44 UTC, Benyamin Limanto
Details
Sample file modified chart ranges (574.35 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2022-11-04 03:11 UTC, m_a_riosv
Details
Flamegraph (432.45 KB, application/x-bzip)
2022-11-04 10:35 UTC, Julien Nabet
Details
Ods file (5.05 MB, application/vnd.oasis.opendocument.spreadsheet)
2022-11-04 22:53 UTC, m_a_riosv
Details
Another demonstration document (3.13 MB, application/vnd.oasis.opendocument.spreadsheet)
2022-11-09 14:19 UTC, paul
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benyamin Limanto 2022-11-03 13:42:47 UTC
Description:
As title stated, 

Hello, I'm facing a performance Issue on a spreadsheet file, when it contain 700-1000 rows of data that's using chart with 3 different chart, on different sheet, it freeze, and takes time to load, but when using other office (MS[on wine or not], WPS, Only, Google on Web Browser), I don't face the same problem. I referred to open Bugs ticket on LO Bugzilla when on LiberaChat and reddit by other LO contributor.

More Detail Version : Version: 7.3.6.2 Build ID: 30(Build:2) CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: gtk3 Locale: id-ID (en_US.utf8); UI: en-US Calc: threaded

and other version 

Version: 7.4.2.3 / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: id-ID (en_US.utf8); UI: en-US
Calc: threaded

This is the sampe data(in xlsx), even it's from ods, it yield same behavior

https://isttsacid-my.sharepoint.com/:x:/g/personal/ben_stts_edu/ERzzHEXW9U5NnnrZXDZ3GfUB7x_rRzLwB8Wp04NoosAr1g?e=eyJaeT

Could anyone test this? Is there any workaround for it? As I start using LO daily, this is a hazzle tbf for me, that I need to spin up KVM Win 10 or using Wine/CrossOver MS Office 2021...(which partially broken on Wine, and spin up KVM is also a burden sometimes)

Thank you

Steps to Reproduce:
1.Open the xlsx/ods that contain chart that have more than 800 data points
2. wait, and look into task manager, CPU spike, fan kick in, wait... 10-15 minutes
3. data opened, but not usable, as scrolling is very very slow

Actual Results:
Slow, unusable spreadsheet/calc

Expected Results:
Open fine like in other office suite, not making it slowdown and spike CPU


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.4.2.3 / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: id-ID (en_US.utf8); UI: en-US
Calc: threaded

Fedora 36, latest update.
Comment 1 Benyamin Limanto 2022-11-03 13:44:10 UTC
Created attachment 183391 [details]
The sample xlsx

This is the sample xlsx, could be tested by any LO version
Comment 2 Telesto 2022-11-03 20:01:33 UTC
Confirm slowness with
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9cd0f4c2d25462feba0ffcbd906c199273821243
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

and with 7.1
Comment 3 Telesto 2022-11-03 20:02:25 UTC
A flamegraph would be nice
Comment 4 m_a_riosv 2022-11-04 03:11:41 UTC
Created attachment 183401 [details]
Sample file modified chart ranges

Seems calc doesn't like column ranges in chart ranges.
Charts have column ranges, but calc doesn't treat them like that and doesn't shortcut to analyze at then end of the data.
Changed in the sample file, the chart ranges to 9999 rows, runs very smoothly.

It also makes load and save near instantly. And problem with the original sample, at load & save it's also in ods format.
Comment 5 Benyamin Limanto 2022-11-04 07:25:19 UTC
(In reply to m.a.riosv from comment #4)
> Created attachment 183401 [details]
> Sample file modified chart ranges
> 
> Seems calc doesn't like column ranges in chart ranges.
> Charts have column ranges, but calc doesn't treat them like that and doesn't
> shortcut to analyze at then end of the data.
> Changed in the sample file, the chart ranges to 9999 rows, runs very
> smoothly.
> 
> It also makes load and save near instantly. And problem with the original
> sample, at load & save it's also in ods format.

Could you share the resulted ods file? I want to try here, thanks. Because last time I tried to create a brand new ods file using that method, it ends up like the xlsx, so I think it's the same problem. thanks.
Comment 6 Julien Nabet 2022-11-04 10:35:05 UTC
Created attachment 183404 [details]
Flamegraph

Here's a Flamegraph retrieved on pc Debian x86-64 with master sources updated today + gen rendering.
Comment 7 Julien Nabet 2022-11-04 10:44:27 UTC
Let's put this one to NEW since we can reproduce the slowness.

Eike/Noel: perhaps you may find some ways to improve perf from the Flamegraph.
Comment 8 m_a_riosv 2022-11-04 22:53:14 UTC
Created attachment 183424 [details]
Ods file
Comment 9 Benyamin Limanto 2022-11-05 06:26:15 UTC
(In reply to m.a.riosv from comment #8)
> Created attachment 183424 [details]
> Ods file

Sadly it's worst here, 15-20 minutes waiting to load, and unresposive sadly.. hmm.... :/ 

My computer is i7-2640m, 12gb ram, and SATA SSD with speed of 550mb read write, hmm... 

For now I will spin KVM with Excel first, anyway the ods open fast in Other office, but not in libre :/
Comment 10 Benyamin Limanto 2022-11-05 06:28:20 UTC
(In reply to m.a.riosv from comment #8)
> Created attachment 183424 [details]
> Ods file

But it's usable after the ods loaded, which is nice, just the file is big, very big, 300kb to 5mb ah... Thanks for sharing!
Comment 11 paul 2022-11-09 14:19:14 UTC
Created attachment 183498 [details]
Another demonstration document

I have the same issue. Core i7 2700k with 32GB RAM and an SSD. Opening the file is slow, clicking on the graph to edit it hangs for several minutes.

Version: 7.1.1.2 (x64) / LibreOffice Community
Build ID: fe0b08f4af1bacafe4c7ecc87ce55bb426164676
CPU threads: 8; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded