Bug 82812 - Calc not responding for a while when trying to print - detect blocks of empty rows
Summary: Calc not responding for a while when trying to print - detect blocks of empt...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.6.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
 
Reported: 2014-08-19 11:35 UTC by abma
Modified: 2024-02-29 11:02 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
document crashing calc when printing (17.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-08-19 11:35 UTC, abma
Details
Screenshot with print dialog and one object in background. (217.93 KB, image/png)
2014-08-19 16:42 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description abma 2014-08-19 11:35:42 UTC
Created attachment 104886 [details]
document crashing calc when printing

when printing the document, LO crashes!

to reproduce
file -> print

the print dialog never shows up!
Comment 1 sophie 2014-08-19 12:48:15 UTC
Hi, confirmed with 4.2.6.2 and 4.3.0.4 on Ubuntu 14.04 x64, I don't have a crash, but the dialog doesn't show up and I've to kill soffice. Set as new. Sophie
Comment 2 m_a_riosv 2014-08-19 16:42:38 UTC
Created attachment 104904 [details]
Screenshot with print dialog and one object in background.

Win7x64i3
Version: 4.2.6.1 Build ID: 5fdddf655fba363e34f755715238d0943a44857e

Maybe the problem is with a lot of Draw objects all with the same name. In the last columns of the sheet. Deleting those objects works fine.

Doesn't crash for me, take like a minute with a high cpu usage to show the dialog.

Not clear for me it is a bug, can be the needed time to compose the preview that is showed in print dialog with such objects involved.
Comment 3 Caolán McNamara 2015-02-06 14:04:36 UTC
caolanm->erack: there is nothing in the document except a little at the top left and then some stuff at A1048523. And ScPrintFunc::CalcPages does a mega loop from 0 to 1048523 over every row. Is there no better way to loop over those in terms of some sparse array where the vast empty range can be collapsed together ?
Comment 4 Eike Rathke 2015-02-10 12:33:59 UTC
Ouch.. certainly there is a way to detect blocks of empty rows asking the column storage. The logic of when and how to include empty rows if requested and exclude hidden rows would have to remain though, but maybe the algorithm could be improved.
Comment 5 abma 2015-07-16 15:07:10 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2016-09-20 10:18:36 UTC Comment hidden (obsolete)
Comment 7 abma 2016-09-20 13:24:54 UTC
5.1.4.2 still crashes.
Comment 8 Xisco Faulí 2017-02-28 12:43:39 UTC
Issue reproducible in

Versión: 5.3.0.3
Id. de compilación: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
Subpr. de CPU: 1; Versión de SO: Windows 6.1; Repr. de IU: predet.; Motor de trazado: HarfBuzz; 
Configuración regional: es-ES (es_ES); Calc: group

and

Version: 5.4.0.0.alpha0+
Build ID: bd8c68c99cce51a3368d8ddfd6e11dccb72d8f49
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 9 QA Administrators 2018-07-27 02:42:17 UTC Comment hidden (obsolete)
Comment 10 Timur 2018-08-16 12:53:54 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2019-08-19 07:01:42 UTC Comment hidden (obsolete)
Comment 12 Timur 2019-08-26 07:30:15 UTC Comment hidden (obsolete)
Comment 13 Timur 2019-08-26 08:58:22 UTC
First when I tried Print with 6.4+ in Windows, it was slow but it did print in the end. So I'll change "hangs" to "not responding".
Looking at comments 2, 3, 4 I'll change "Major" to "Enhancement".
Comment 14 Buovjaga 2021-05-03 10:12:51 UTC
Dialog still slow to appear

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9c930c4f3109d123c0831d0fcecf9c8b32e5bbc7
CPU threads: 2; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded
Comment 15 Roman Kuznetsov 2022-10-23 12:23:08 UTC
Still repro in

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9d1d668a608cc5b406601c2f7f3d8581e8f47d1c
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded
Comment 16 a07cd040897db54e103c 2023-03-21 14:23:56 UTC
retestet with:

Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 16; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 1:7.0.4-4+deb11u4
Calc: threaded

=> problem still exists
Comment 17 a07cd040897db54e103c 2023-04-26 12:20:39 UTC
retestet with:

Version: 7.4.5.1 / LibreOffice Community
Build ID: 40(Build:1)
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 4:7.4.5-2
Calc: threaded

=> no crash 
=> very slow responding
=> laggy interaction with print dialog
=> may be also related to rendering 800+ pages
=> printed in the end
Comment 18 RoF 2024-02-29 11:02:19 UTC
Can be closed as no calc problem. With >800 pages the creation takes a while...