Bug 112000 - Slow pasting of a big block of cells with even rows blank
Summary: Slow pasting of a big block of cells with even rows blank
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium normal
Assignee: Luboš Luňák
URL:
Whiteboard: target:6.3.0
Keywords: bibisected, perf, regression
: 120558 (view as bug list)
Depends on:
Blocks: Paste multi_type_vector-regressions
  Show dependency treegraph
 
Reported: 2017-08-24 09:48 UTC by Chris Severance
Modified: 2019-05-20 09:24 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Severance 2017-08-24 09:48:29 UTC
Description:
A spreadsheet with alternating blank rows makes many column and area mark operations slow.


Steps to Reproduce:
New spreadsheet
Create solid block of A from A1 to N32000
  Place "A" in A1. Select A1. Copy to clipboard.
  Mark A1:N32000, paste, yes to overwrite. Note the fast paste.
Select each column individually A then B then C.. to N. Note the fast response.
Fast response is expected behavior.

Close all, new spreadsheet.
Create block of A from A1 to N32000 with all even lines blank.
  Place "A" in A1, leave A2 blank.
  Select A1-A2, copy to clipboard.
  Select A1:N32000, paste, yes to overwrite. Note slow paste.
Mark each column as before. Note slow response.
Slow response is unexpected behavior.

Close all, new spreadsheet.
Create solid block of A from A1 to N32000
Change column A so it is blank every other row.
Mark column A is slow. Marking all other columns is fast.


Actual Results:  
See above.

Expected Results:
See above.


Reproducible: Always

User Profile Reset: No. It happens on multiple computers.

Additional Info:
This is likely to affect blank every other column but that has not been tested.


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Comment 1 Buovjaga 2017-09-08 15:08:02 UTC
(In reply to Chris Severance from comment #0)
> Change column A so it is blank every other row.

How do I do this automatically?
Comment 2 Chris Severance 2017-09-08 15:25:46 UTC
The 3rd test is a combination of the first two. The instructions for the second test can blank every other row in the entire block or just the first column.

The idea is to show that only the columns with every other row blank are slow. Nearby full columns are fast.

...
Change column A so it is blank every other row.
  Delete the value in A2
  Select A1-A2, copy to clipboard.
  Select A1:A32000, paste, yes to overwrite.
Comment 3 Buovjaga 2017-09-08 15:36:12 UTC
Ok, sorry, I was tired.. I do repro the second case, but in the 3rd case, clicking the column name results in it being selected just as fast in A.

Interestingly, it is a regression as in 3.6 the pasting is fast.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: a27eb931c22313d4dd5c73b35358c0532d20b79e
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on September 8th 2017

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 4 Chris Severance 2017-09-08 15:52:06 UTC
In 5.4.1.2.0 (5.4.1-1) the slow column marking for test 2 and 3 have been fixed. The slow paste continues.
Comment 5 Buovjaga 2017-09-11 12:42:33 UTC
For testers like me, who are not Calc power users: selecting the big block is easy by just typing/pasting A1:N32000 into the cell name box (above the row/column corner in the left).
Comment 7 QA Administrators 2018-09-16 02:49:13 UTC Comment hidden (obsolete)
Comment 8 Roman Kuznetsov 2018-09-16 07:58:07 UTC
slow pasting two values (one cell with value and another cell is empty) in to range A1:O32000 still repro in

Version: 6.1.1.2 (x64)
Build ID: 5d19a1bfa650b796764388cd8b33a5af1f5baa1b
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: ru-RU (ru_RU); Calc: CL
Comment 9 Dennis Francis 2019-05-15 09:27:28 UTC
Looks like the root cause for this and tdf#120558 seems the same. I'm looking into this.
Comment 10 Luboš Luňák 2019-05-17 12:49:25 UTC
Another variant of a testcase is following the instructions, but setting A2 to "ABC" instead of leaving it empty. Internally different and a bit harder to fix.
Comment 11 Commit Notification 2019-05-20 08:04:01 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

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

cache mdds positions also in CopyTextAttrsFromClipHandler (tdf#112000)

It will be available in 6.3.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 12 Commit Notification 2019-05-20 08:06:04 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

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

cache mdds positions during ScDocument::CopyBlockFromClip() (tdf#112000)

It will be available in 6.3.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 13 Luboš Luňák 2019-05-20 08:08:03 UTC
*** Bug 120558 has been marked as a duplicate of this bug. ***
Comment 14 Xisco Faulí 2019-05-20 09:24:57 UTC
Verified in

Version: 6.3.0.0.alpha1+
Build ID: 9c7fac47aacb0877c7d212217089a680400c1377
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

@Luboš Luňák, thanks for fixing this issue!!