Bug 115020 - Cutting a large dataset is very slow since 6.1.0.0.alpha0+
Summary: Cutting a large dataset is very slow since 6.1.0.0.alpha0+
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Henry Castro
URL:
Whiteboard: target:6.1.0
Keywords: bibisected, bisected, perf, regression
Depends on:
Blocks:
 
Reported: 2018-01-15 11:45 UTC by Telesto
Modified: 2018-02-26 14:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Bibisect log (2.13 KB, text/plain)
2018-01-28 14:37 UTC, Telesto
Details
VerySleepy profiler screenshot (135.81 KB, image/png)
2018-02-03 23:07 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-01-15 11:45:00 UTC
Description:
Cutting a large dataset is very slow compared to 6.0.0.0.alpha1+

Steps to Reproduce:
1. Open the file found here: https://yadi.sk/i/rM9QctDym5y3M
2. Cut columns A-C. 

Actual Results:  
Needs more than a minute

Expected Results:
Few seconds (+/- 5)


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 6.1.0.0.alpha0+
Build ID: ef22c4a0a99be5d2903fb9e9d09fc852cd791173
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-01-12_09:16:04
Locale: nl-NL (nl_NL); Calc: CL

but not in
Version: 6.0.0.0.alpha1+
Build ID: 80af51be1aa85733b9c0b696a93edd8c6520811c
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Jacques Guilleron 2018-01-15 14:26:45 UTC
Hi Télesto,
sa
Comment 2 Jacques Guilleron 2018-01-15 14:30:56 UTC
Hi Télesto,

I get the same time on cutting in the two versions undre Windows 7.
Comment 3 Telesto 2018-01-15 14:42:45 UTC
(In reply to Jacques Guilleron from comment #2)
> Hi Télesto,
> 
> I get the same time on cutting in the two versions undre Windows 7.

Hi Jacques,

Thanks for testing. I still repro this with: 
Version: 6.1.0.0.alpha0+
Build ID: 80fb8d406ced47e6a2089f0c8ba5c103d2fec91f
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-01-15_05:18:42
Locale: nl-NL (nl_NL); Calc: CL

Could you give some more info about the tested versions?
Comment 4 Xavier Van Wijmeersch 2018-01-15 17:49:00 UTC
@Telesto

With linux build it needed 7 min

Version: 6.1.0.0.alpha0+
Build ID: fa014ee6e13d182cb5830698558284e7caffa5f9
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group threaded
Comment 5 Telesto 2018-01-15 18:17:13 UTC
(In reply to Xavier Van Wijmeersch from comment #4)
> @Telesto
> 
> With linux build it needed 7 min
> 
> Version: 6.1.0.0.alpha0+
> Build ID: fa014ee6e13d182cb5830698558284e7caffa5f9
> CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
> Locale: nl-BE (en_US.UTF-8); Calc: group threaded

Thanks! Sounds like conformation to me ;-) Any change - for the record - to compare it with 5.4?
Comment 6 Telesto 2018-01-15 18:45:30 UTC
No repro with
Versie: 6.0.0.2
Build ID: 06b618bb6f431d27fd2def25aa19c833e29b61cd
CPU-threads: 4; Besturingssysteem: Windows 6.3; UI-render: GL; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 7 Xavier Van Wijmeersch 2018-01-15 19:18:07 UTC
it takes 5.5 seconds with

Version: 5.4.4.2
Build ID: 2524958677847fb3bb44820e40380acbe820f960
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 8 Xavier Van Wijmeersch 2018-01-15 19:34:47 UTC
no repro with

Version: 6.0.1.0.0+
Build ID: 1f497913901972fd51c222a5824c21f6bda5c0db
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 9 Telesto 2018-01-28 14:37:29 UTC
Created attachment 139408 [details]
Bibisect log

Regression introduced by:

author	Henry Castro <hcastro@collabora.com>	2017-08-12 19:46:27 -0400
committer	Henry Castro <hcastro@collabora.com>	2017-12-08 13:06:57 +0100
commit 1b7a8277aa3e9f73ccdf15e933a1ee3b42849a44 (patch)
tree 64474c3499c36d31f0ea13d348245a6bea6abbe6
parent 630be5751029fc8ebf5a8784fb1c07894a0e1600 (diff)
sc lok: 1 view has 1 clipboard to transfer data
In tiled rendering case, each view copy and paste
the contents of the clipboard associated with the view
Comment 10 Telesto 2018-01-28 14:38:37 UTC
Adding CC to: Henry Castro
Comment 11 Aron Budea 2018-02-03 23:07:36 UTC
Created attachment 139562 [details]
VerySleepy profiler screenshot

It seems that calling TransferableDataHelper::CreateFromSystemClipboard(...), and especially TransferableDataHelper::InitFormats() inside that is very expensive.
Attaching profile results, of 133s, ~123s is spent in that function (inclusive).
That's what should be avoided somehow.
Comment 12 Henry Castro 2018-02-05 01:22:57 UTC
Thanks all,

Oh I see, I will review TransferableDataHelper::CreateFromSystemClipboard(...)
to check performance
Comment 13 Commit Notification 2018-02-07 21:24:23 UTC
Henry Castro committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1fcf76b8f33ddca3f00256e3c41104314988a9f4

tdf#115020: Cutting a large dataset is very slow since 6.1.0.0.alpha0+

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.