Bug 133808 - Moving a sheet with a chart based on a datarange to a different tab position takes 30 seconds until moved an still unusable for 40 seconds afterwards
Summary: Moving a sheet with a chart based on a datarange to a different tab position ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, perf, regression
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2020-06-08 21:01 UTC by Telesto
Modified: 2020-08-03 21:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Bibisect log (3.86 KB, text/plain)
2020-06-08 21:02 UTC, Telesto
Details
Example file (9.33 MB, application/vnd.ms-excel)
2020-06-08 21:03 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-06-08 21:01:59 UTC
Description:
Moving a sheet with a chart based on a datarange to a different tab position takes 30 seconds until moved an still unusable for 40 seconds afterwards

Steps to Reproduce:
1. Open the attached file
2. Move sheet 2 before 500k formula sheet

Actual Results:
30 seconds before sheet moved..
Click the sheet it hangs again

Expected Results:
10 seconds and usable after move


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.0.0.0.beta1+
Build ID: c344de1b9985b6ca10b354e24151d0bdf92dc20e
CPU threads: 2; OS: Linux 5.3; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

but not in
4.2
Comment 1 Telesto 2020-06-08 21:02:54 UTC
Created attachment 161782 [details]
Bibisect log

Bisected to
3abe790c27b619aa5e9848f34b152069527473bf is the first bad commit
commit 3abe790c27b619aa5e9848f34b152069527473bf
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Thu May 28 21:13:02 2015 +0800

    source-hash-0ce6d9bcea7c37a7cb2c42e8393e2e20780bd171
    
    commit 0ce6d9bcea7c37a7cb2c42e8393e2e20780bd171
    Author:     Markus Mohrhard <markus.mohrhard@collabora.co.uk>
    AuthorDate: Thu Apr 17 02:02:15 2014 +0200
    Commit:     Markus Mohrhard <markus.mohrhard@googlemail.com>
    CommitDate: Thu Apr 17 02:08:59 2014 +0200
    
        limit the range shrinking in charts to really large ranges, fdo#70609,
    
        Also improves the situation for fdo#55697.
    
        It is just the fist step to a better algorithm.
    
        Change-Id: I15de1ca6604e585fcf5690f0d903c757d641e765
Comment 2 Telesto 2020-06-08 21:03:38 UTC
Created attachment 161783 [details]
Example file
Comment 3 b. 2020-06-09 06:23:33 UTC
about 15/15 sec. here, 

set to new as improvements would be nice, but not a 'big issue'

Version: 7.0.0.0.alpha1
Build ID: 6a03b2a54143a9bc0c6d4c7f1...
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: de-DE (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 4 Telesto 2020-06-09 11:03:30 UTC
The same commit causes a delay in removing the sheet (18 seconds vs 32 seconds). And quite a bump in memory usage while deleting. 420 MB versus 1100 MB peak
Comment 5 Telesto 2020-06-10 09:44:55 UTC
Another version
1. Cut the Chart on sheet 2
2. Wait 60 seconds.. prior 20 seconds

Notice also the file opening time -> Slower

Memory usage showing grah
745 MB after the commit
227 MB before the commit
Comment 6 Telesto 2020-06-10 09:48:21 UTC
Adding CC: to Markus Mohrhard
Comment 7 Telesto 2020-06-10 09:49:52 UTC
Bug 70609 comment 2
So the shrinking of data ranges is hurting us here. I was never a big fan of this feature but it seems that we finally need a proper solution for the problem.

The problem is that the content is not yet imported and we are already importing the chart so shrinking to the used data range is wrong.

I'll limit the feature for now to cases where it won't hurt us too much and will think about proper solutions.