Bug 51973 - EDITING: Calc hangs during batch copy & paste of cell containing a formula
Summary: EDITING: Calc hangs during batch copy & paste of cell containing a formula
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.0.1 rc
Hardware: x86-64 (AMD64) Windows (All)
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-11 02:51 UTC by Josh Kim
Modified: 2015-04-18 14:05 UTC (History)
2 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 Josh Kim 2012-07-11 02:51:00 UTC
Problem description: 
Calc always hangs while pasting the cell content copied from the top of a column (C1) containing a simple formula (A1*B1) to rest of the cells all the way to the end of the same column(down to C1048576).

Steps to reproduce:
1. .... Open a new spreadsheet in Calc.
2. .... Fill A1 with a random number. (e.g. '1')
3. .... Fill B1 with a random number. (e.g. '2')
4. .... Fill C1 with a formula '=A1*A2'
5. .... Copy C1.
6. .... Select C2 and press Ctrl + down arrow to move to the end of the column C.
7. .... Press Ctrl + Shift + up arrow to select(highlight) the entire column from the bottom up and return to C1.
8. .... While holding Ctrl, click C1 to exclude the cell from the current (highlighted) selection.
9. .... Press Ctrl + v to paste the previously copied cell content of C1 to the rest of the cells in the column.

Current behavior: Calc hangs and stops responding.

Expected behavior: The copied cell content/formula is applied/pasted to the selected cells.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
Comment 1 billhook 2012-07-13 04:10:33 UTC
Confirmed.

The first time I tried this, it eventually came out of the hang after less than 20 minutes. The cells were pasted correctly.
I then tried a similar thing (but selecting almost the whole column, ) and it hung for 30 minutes+ before I killed it.

Trying on a new document, I was able to paste the same formula into 300,000 rows in around 7 minutes.

All the while the CPU was at full utilisation.

My results suggest this is a performance / scaling problem.

FWIW, trying the same thing in Excel, works instantly.
Comment 2 Josh Kim 2012-07-18 01:03:06 UTC
Please pay attention to this issue ASAP! I am unable to work with my spreadsheet in which a simple multiplication formula (A cell * B cell) was applied to the very bottom of the sheet and after saving the document I am unable to batch delete the cell content without freeze and 100% system resource.The 18MB file takes 10 minutes to open, 10 seconds to switch between sheets and doesn't unfreeze for the last 14 hours after batch content deletion is assigned to the column with the formula.
Comment 3 Josh Kim 2012-07-18 01:04:40 UTC
Both LO 3.5.5 and LO 3.6 RC1 constantly crash during handling of the spreadsheet, while OO 3.4, at least, freezes and doesn't crash.
Comment 4 Michael Meeks 2012-07-19 13:02:54 UTC
I imagine this is a pure performance / scalability issue in the spreadsheet - we're working on these as a long term task. Then again - it'd be really nice to get a stacktrace of where it crashes / hangs if possible.
Comment 5 Josh Kim 2012-07-20 07:33:44 UTC
May I send you the sample file over e-mail? It's a non-disclosure document which requires confidentiality. The file size is around 18-19MB.
Comment 6 m_a_riosv 2012-07-31 00:14:55 UTC
Seems solved in LibreOffice 3.6.0.4rc

http://www.libreoffice.org/download/pre-releases/
Comment 7 m_a_riosv 2012-07-31 00:15:40 UTC
(In reply to comment #6)
> Seems solved in LibreOffice 3.6.0.4rc
> 
> http://www.libreoffice.org/download/pre-releases/

Win7x64Ultimate
Comment 8 Josh Kim 2012-08-03 03:01:13 UTC
Tested. The spreadsheet doesn't crash but it still takes several minutes to open and hangs during batch deletion of the cells with pasted formula.
Comment 9 billhook 2012-08-09 06:40:05 UTC
Now takes 15 seconds to Paste on LO 3.6.0.4 Win Vista SP1 32bit.

Deletion of the pasted cells takes roughly 5 seconds.

I was also able to repeat the test (during the same session) without any problems.
Comment 10 Michael Meeks 2012-08-09 10:37:00 UTC
15 seconds is not ideal, but it is at least somewhat expected.

We're doing some major structural work here for 3.7/4.0 see the blog at eg.

http://kohei.us/2012/08/08/mdds-multi_type_matrix-performance-consideration/

The expectation is that this will be very much quicker for 3.7/4.0 - and there is not much that can be done for 3.6 - so marking FIXED.