Bug 145862 - calc taking too long to paste a table
Summary: calc taking too long to paste a table
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords: perf
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2021-11-24 09:52 UTC by shariqkeen
Modified: 2022-07-26 13:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
spreadsheet result after 15 mins (168.04 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-11-24 09:54 UTC, shariqkeen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description shariqkeen 2021-11-24 09:52:21 UTC
Description:
I'm copying a table from a docx opened in Writer to the Calc. It takes about 15 minutes for the LO to respond and deliver the spreadsheet. When I did same thing in Onlyoffice by opening docx within it, it took only 15 seconds.

Similar long time is taken even when odt is used instead of docx of the same document. I got the odt by exporting from Onlyoffice. I didn't export from LO as it isn't rendering the doc properly as mentioned in Bug 145854. The docx is the same as in Bug 145854 at https://bugs.documentfoundation.org/attachment.cgi?id=176450 [I'm not uploading again due to its size].

Steps to Reproduce:
1. open docx/odt in Writer
2. copy the whole table
3. paste the table in Calc

Actual Results:
Process taking too long.

Expected Results:
Process should be quicker.


Reproducible: Always


User Profile Reset: No



Additional Info:
Additional Info:
Version: 7.2.2.2 / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded
Comment 1 shariqkeen 2021-11-24 09:54:02 UTC
Created attachment 176460 [details]
spreadsheet result after 15 mins
Comment 2 Michael Warner 2021-11-24 15:06:26 UTC
I am able to reproduce this on MacOS as well. Copying from Apple Pages and pasting into LO Calc only takes a few seconds, whereas copying from LO Writer and pasting into LO Calc takes several minutes.
Comment 3 Timur 2022-01-18 15:04:55 UTC
There are links here. Could be a duplicate of bug 45307 or bug 91237.
Comment 4 Commit Notification 2022-03-01 20:33:27 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b871d057c45fdd231aa5e1d2b94e7d0a039f4292

use OUStringBuffer for a string that's modified often (tdf#145862)

It will be available in 7.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 5 Commit Notification 2022-03-01 20:33:35 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/09558e2f45e27d572fd261562c884c2d2cc896a7

avoid a temporary buffer, append to the resulting one (tdf#145862)

It will be available in 7.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 6 Roman Kuznetsov 2022-03-02 12:41:17 UTC
The pasting of the table from the DOCX example to the Calc spreadsheet took 37 sec in

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: dc99d27f04b47c173de934a19b6d6a3cc572c20a
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL

Intel Core2Quad 9540 still here

It took 28 sec in MS Office 2007 (pasting from Word to Excel)
Comment 7 Roman Kuznetsov 2022-03-02 12:45:42 UTC
(In reply to Timur from comment #3)
> There are links here. Could be a duplicate of bug 45307 or bug 91237.

No, 45307 still repro for me