Bug 45539

Summary: : Large array formula calculations extremely slow and cause crash ( worked fine in 3.3 )
Product: LibreOffice Reporter: gppublic
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: medium    
Version: 3.4.5 release   
Hardware: Other   
OS: All   
Whiteboard: BSA
Crash report or crash signature: Regression By:
Attachments: Here's a spreadsheet with 1000 row example

Description gppublic 2012-02-02 04:48:28 UTC
Created attachment 56515 [details]
Here's a spreadsheet with 1000 row example

Problem description: Large array formula calculations ( 1000 rows ) use a huge amount of memory and cause a crash. So spreadsheets which only take less than a second in version 3.3 take 10mins or crash in version 3.4. I have a few spreadsheets I just can't open in 3.4.

Steps to reproduce:
1. Enter Formula into say F2 ( Hitting CTRL+SHIFT+Return to enter array formula ) =SUM(IF(A1:A400="A",IF(B1:B400="A",IF(C1:C400="A",D1:D400,0),0),0))
2. Add some rows of data to columns A to D e.g. A A A 4
3. The recalc will be very slow compared to version 3.3. If the range is extended e.g A1:A1000, B1:B1000 then crashes.

- My guess is that the order of looping around the array formula has been changed between versions, requiring inefficient use of memory. I had a similar problem in my code once, and just changing the order of the for loops produced identical results.

Current behavior:

Expected behavior:

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11#

- Same behaviour in Ubuntu Linux & Windows XP
Comment 1 gppublic 2012-02-14 06:52:24 UTC
It's fixed in 3.5. Thanks.