Bug 162221 - Delay of up to 10 seconds when copying a field into clipboard by <Ctrl-C>
Summary: Delay of up to 10 seconds when copying a field into clipboard by <Ctrl-C>
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.5.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart Cut-Copy
  Show dependency treegraph
 
Reported: 2024-07-27 06:47 UTC by Ralf
Modified: 2024-11-23 00:12 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (1.50 MB, application/vnd.oasis.opendocument.spreadsheet)
2024-07-28 09:14 UTC, Ralf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf 2024-07-27 06:47:29 UTC
Description:
When copying a field (or a selection of multiple fields) into clipboard the system is blocked for about 10 seconds (mouse-waiting symbol) before it's possible to continue working. This happens always when copying the first time after opening the calc file. Subsequent copy-actions are quick. It happens at a large table (more than 20000 lines).

Steps to Reproduce:
1. Open calc file with large table
2. Click into any (not empty) field
3. Type Ctrl-C for copy into clipboard

Actual Results:
Mouse pointer changes into waiting symbol for several seconds and system is blocked

Expected Results:
Having the field copied into clipboard without delay


Reproducible: Always


User Profile Reset: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 1 m_a_riosv 2024-07-27 08:06:55 UTC
Please attach a sample file(s), reduce the size as much as possible without private information.
Comment 2 Ralf 2024-07-28 09:14:32 UTC
Created attachment 195563 [details]
Example file

The file is rather complex with four tabs with calculations and diagrams. I've realized that when removing the calculation/diagram tabs the file size is reduced and the delay when copying into the clipboard the first time disappears.
This might be a quite special use case. Nevertheless, I'd expect that copying fields into the clipboard wouldn't trigger any re-calculations, so I wouldn't expect the delay.
Hopefully helpful information.
Thanks!
Comment 3 m_a_riosv 2024-07-28 13:38:11 UTC
Reproducible,

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4be345abd678babcbb989db1e7a16021ad1da562
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

First version that fails on the ones I have installed.
Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded

Latest version that works on the ones I have installed.
Version: 24.2.1.1 (X86_64) / LibreOffice Community
Build ID: 359ef544e625d2ffbfced462ab37bd593ca85fa7
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded


There is some delay, at the first copy on the range:
Log.A21298:A21301

But always a delay in:
Tag.A2:A4

Seems it is in relation with charts, on the last range deleting the chart in the sheet avoids the issue.
Comment 4 gladys 2024-07-30 20:09:48 UTC
tried bisecting in 24.2 but couldnt find anything 
In 24.8 seem to point to
commit: 709866a3b8e073fab4937dcf91dcd33ff1d2bc13
author	Mike Kaganski 
Sun Mar 03 02:04:24 2024
commit message: tdf#99969: make sure to copy the chart source ranges to clipboard.
Comment 5 Aryeh 2024-11-21 22:43:14 UTC Comment hidden (obsolete)
Comment 6 raal 2024-11-21 23:31:52 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.8.
Adding Cc: to Mike Kaganski ; Could you possibly take a look at this one?
Thanks
 2cc979e273617d37e10ab7657ddfa562bdcfb268 is the first bad commit
commit 2cc979e273617d37e10ab7657ddfa562bdcfb268
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Sun Mar 3 01:48:44 2024 +0100

    source 709866a3b8e073fab4937dcf91dcd33ff1d2bc13

164294: tdf#99969: make sure to copy the chart source ranges to clipboard | https://gerrit.libreoffice.org/c/core/+/164294


There is a two second delay on my PC.
Comment 7 Mike Kaganski 2024-11-22 05:20:08 UTC
(In reply to m_a_riosv from comment #3)
> But always a delay in:
> Tag.A2:A4

Thanks for the mention! People writing things like "any (not empty) field" don't realize how their "I'm sure it will be reproducible always, so I won't take a smallest effort to add "e.g. X1, which I tested right now" to help others" makes others' lives more difficult.

This is not a bug. The change made exactly that. The range Tag.A2:A4 contains the chart's anchor; so the anchor is copied to the clipboard. Copying the anchor, you have to copy its data range. It may be complex, but it has to be done, to avoid bad copy.

I remove myself and the regression bits. It may be a perf issue, and someone may have skills to improve it.
Comment 8 m_a_riosv 2024-11-23 00:12:54 UTC
Thanks @Mike, the explanation it's enough for me, I return the bug to unconfirmed.

Also with the navigator I can see four instances of 'Char 1', they look the same, deleting three duplicates, the copy improves a lot.