Bug 113112 - EDITING: Adding a new sheet before a existing large sheet is pretty slow
Summary: EDITING: Adding a new sheet before a existing large sheet is pretty slow
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:6.3.0.1
Keywords: bibisected, perf, regression
: 125666 126092 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-14 08:44 UTC by Telesto
Modified: 2019-06-27 06:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Bibisect log (4.64 KB, text/plain)
2017-10-14 08:46 UTC, Telesto
Details
Additional example (4.89 MB, application/vnd.oasis.opendocument.spreadsheet)
2017-11-09 21:04 UTC, Telesto
Details
sample file (14.39 MB, application/vnd.oasis.opendocument.spreadsheet)
2018-12-19 10:18 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-10-14 08:44:44 UTC
Description:
Adding a new sheet before a existing large sheet is pretty slow

Steps to Reproduce:
Description:
Saving an large calc sheet is slower in LibO5.4 compared to LibO5.3
Steps to Reproduce:
1. Download https://yadi.sk/i/rM9QctDym5y3M
2. Open the file
3. Menu -> Sheet -> Insert Sheet -> OK (default setting is before current)
4. Inserting the new sheet takes a long long time with high CPU usage

Actual Results:  
Long wait, with high CPU usage

Expected Results:
Should immediately be added


Reproducible: Always

User Profile Reset: No

Additional Info:
Found in
Version: 6.0.0.0.alpha0+
Build ID: c5a93cad149618bbd43632f1660a558c34bdbf7e
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-10-07_01:04:25
Locale: nl-NL (nl_NL); Calc: CL

and in LibO4.1


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Telesto 2017-10-14 08:46:10 UTC
Created attachment 136968 [details]
Bibisect log

Bibisected to 0a8818fa523e608d895395ff5704d659f2f72533 is the first bad commit
commit 0a8818fa523e608d895395ff5704d659f2f72533
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Fri Sep 18 11:09:46 2015 +0800

    source-hash-af86f7b26f2fafbb0fdfe24682b4700a51334d18
    
    Bibisect: This commit covers the following source commit(s) which failed to build
    794d35975a35cab2ca992c45820e771481294581
    44c5a08b46bd32f5c2344380bcc38b6d09e714bb
    433661f7fc76e82595944379b5f1739c1a275331
    ff4731fb89f3b9d394c3826ab8dbe9d77df90a5a
    59f38babd074cc0b835a5d2a1c81af013dba0deb
    cfc71668da381c3a2304b4de6288a1af82ce0752
    c86014f5c6340a97bcea600ae3bd31d5f54feebb
    3c5cc7d56f6185ea0bf7593a0cd8e73232d97ddb
    24c5c1185d5908b47605782f44a9e3c5fe1814ac
    f34620b40b94d8021637c86ceb651ec881515397
    62f119b5d1c786203448c3a208fd2a2ffd26b835
    2cf33119ab461befc7226cc532593a5435ab3167
    b1c4f952223aa208067636936a7fbc00c51eeb14
    6cbca6fc0ceee4370a962d67db362f3e22270e18
    0f18a3a4bb3a4998867995f4ca8b87dacbb2ca40
    667a112815225d65e126898add254a0903ecd34f
    cd80616ef96bce7b4180d31c9b37ea17fe7efae0
    c929a78a453e3b06fd99b213fee8587dfdd68e3e
    cc7ec4b3066d47e632ebb0478259a060d030373a
    4e8206b40d960509606d4e19012da296ab71aee8
    1f083d2d288c74ffb2ae6395d163828b2a9ce4d9
    4259df774a5785b3af7bbc92dee42ecc753b12e4
    beb1db61eeb9dd15bacc4941c2c9fcd91f6df9b6
    d3a3db0e5fd5693b14caf53e50eb564912980722
    c264a7e7176da645698c770ac50a76ce5b632efa
    6cac65cc6e89f4f36dbcca3682f08b7b5ed5b750
    c6d4a39832357b9e836c0c9903d2286bcf1a69d2
    7e44f6b6ad386572b7f017a7a66bcd68d586a329
    338a6cb6c548764ed5e4dad0ca26eb3ff8d387ab
    
    commit af86f7b26f2fafbb0fdfe24682b4700a51334d18
    Author:     Kohei Yoshida <kohei.yoshida@gmail.com>
    AuthorDate: Thu May 9 11:52:55 2013 -0400
    Commit:     Kohei Yoshida <kohei.yoshida@gmail.com>
    CommitDate: Thu May 9 13:34:37 2013 -0400
    
        Remove a patch that's no longer needed.
    
        Change-Id: Ie309848f80606432752b60fbdf34e7597308d800
Comment 2 Buovjaga 2017-11-04 19:37:40 UTC
Repro.

Version: 6.0.0.0.alpha1+ (x64)
Build ID: 7e03c4eed72452fdfb87341214a21956c08ba969
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-10-26_00:58:29
Locale: fi-FI (fi_FI); Calc: group
Comment 3 Telesto 2017-11-09 21:04:45 UTC
Created attachment 137650 [details]
Additional example

Additional example

1. Open the attached file
2. Move empty sheet 'Tabelle2' after 'Tabelle3' using drag an drop
Comment 4 QA Administrators 2018-11-10 03:51:48 UTC Comment hidden (obsolete)
Comment 5 Roman Kuznetsov 2018-11-10 07:30:13 UTC
still repro in

Version: 6.2.0.0.alpha1+
Build ID: 2f1a4e0a875ea43f3845c95ea46ed95fd9c2923d
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-11-01_01:27:42
Locale: ru-RU (ru_RU.UTF-8); Calc: threaded

LO just freeze, I have only 25% CPU load
Comment 6 Xisco Faulí 2018-12-19 10:18:20 UTC
Created attachment 147665 [details]
sample file
Comment 7 Xisco Faulí 2018-12-19 10:27:42 UTC
Still reproducible in

Version: 6.3.0.0.alpha0+
Build ID: 78073ecfdc50e78e3ce094c1259779b7c3b88bc4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 8 Xisco Faulí 2018-12-19 10:29:23 UTC
@Luboš Luňák, since you fixed bug 102364, which was introduced in a similar range of commit that this bug, I thought you might be interested in this one...
Comment 9 Xisco Faulí 2019-06-25 16:58:20 UTC
Still reproducible in

Version: 6.4.0.0.alpha0+
Build ID: 52800731baf9fcb88e54d60de5585640c8f97f7b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

root cause seems the same for this issue and bug 126092
Comment 10 Commit Notification 2019-06-26 12:42:22 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/ea19b0c0230fcc730245ecd445c03164cb6a1d18%5E%21

tdf#113112 insert a new sheet slow

It will be available in 6.4.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 11 Xisco Faulí 2019-06-26 15:13:35 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: ea19b0c0230fcc730245ecd445c03164cb6a1d18
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Noel, thanks for fixing this issue!!
Comment 12 Xisco Faulí 2019-06-26 15:14:05 UTC
*** Bug 126092 has been marked as a duplicate of this bug. ***
Comment 13 Xisco Faulí 2019-06-26 15:17:23 UTC
*** Bug 125666 has been marked as a duplicate of this bug. ***
Comment 14 Commit Notification 2019-06-27 06:50:49 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/7aa6682e05370ea559c02e8c415781346e720040%5E%21

tdf#113112 insert a new sheet slow

It will be available in 6.3.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.