Bug 38541 - Performance: do not update a chart during data range modification
Summary: Performance: do not update a chart during data range modification
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
3.4.1 RC1
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2011-06-21 13:40 UTC by Jean-Baptiste Faure
Modified: 2015-12-15 11:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
bar chart which freeze LibO with 100% CPU when you modify the data range (333.38 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-06-21 14:11 UTC, Jean-Baptiste Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Baptiste Faure 2011-06-21 13:40:30 UTC
Step to reproduce:
- open a spreadsheet with a lot of data and a chart with a large data range
- double-click on the chart to edit
- right click on the chart and choose Data Range
- suppose you have a data range like this : $Sheet1.$A$1:$A$2899;$Sheet1.$B$1:$B$2899 : XY chart with 2899 data points
- try to modify the range 2899 to 3099 to take into account 200 more data points
- to do that you place the cursor at the end of the first 2899 and hit the delete key to remove 2899, then type 3099. 
When you type this value LibreOffice freeze because it is updating the chart with these incomplete information.

Proposition: do not update the chart until the user hit the validation key.
Comment 1 Jean-Baptiste Faure 2011-06-21 14:11:27 UTC
Created attachment 48256 [details]
bar chart which freeze LibO with 100% CPU when you modify the data range

When you modify the second data series as you can't modify in the same time both number 2899 to 3099 (for example) your chart is inconsistent until you hit the validation key.
Comment 2 Michael Meeks 2011-06-24 04:01:26 UTC
Wow - this was a great, clear bug report, easy to reproduce etc.
Rendering charts with -lots- of data points, of course takes some CPU time, prolly more than it should.
I suspect bug#38590 also caused some serious grief here in 3.4.1 rc1/2 since it had a substantial negative performance impact.

Can you re-test with rc3 ? :-)

Thanks.
Comment 3 Rainer Bielefeld Retired 2011-06-24 04:12:12 UTC
May be we need a preference check box? what is with a chart showing external data from the web? A simple "only upgrade with <f9> or similar would be too simple.
Comment 4 Jean-Baptiste Faure 2011-06-24 05:06:41 UTC
(In reply to comment #3)
> May be we need a preference check box? what is with a chart showing external
> data from the web? A simple "only upgrade with <f9> or similar would be too
> simple.

I do not suggest to not update automatically the chart. Only to wait that the user have finished to modify data range in the UI to update the chart. In other word the update should be triggered by the click on the validate button.

That said we have the same performance problem in the chart wizard : if you select a large amount of data and click the button to create a chart, the wizard try to make a preview of a bar chart without waiting the user have defined the chart type. The preview should be done after the chart type has been chosen.
Comment 5 Björn Michaelsen 2011-12-23 12:27:03 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 6 Jean-Baptiste Faure 2011-12-26 00:44:54 UTC
On my new computer the performance problem is not as sensible as it was previously but chart update is still done before the user validate its changes. I still consider that as useless and detrimental to small configurations.

Best regards. JBF
Comment 7 Kohei Yoshida 2012-01-11 08:09:25 UTC
One thing we could do is to update when the text box gets de-focused.  Right now it updates when the user stops typing for a few seconds, which is not that bad, but sometimes we draw very slow.

Or, we could do a combo.  Re-draw the chart when the text box gets de-focused, or when the user stops typing but make the wait period longer (say, 10 seconds).
Comment 8 Jean-Baptiste Faure 2012-01-11 21:23:57 UTC
Hi Kohei,

Thank you for these informations. I can test both options if you explain me what to modify in the code. :-)
Is there a reason to not update the graph only when the user hits the OK button?

Best regards. JBF
Comment 9 Kohei Yoshida 2012-01-12 08:53:41 UTC
(In reply to comment #8)
> Hi Kohei,
> 
> Thank you for these informations. I can test both options if you explain me
> what to modify in the code. :-)

I appreciate your enthusiasm.  I haven't looked into the chart code yet, so no pointers at the moment.  But I will.

> Is there a reason to not update the graph only when the user hits the OK
> button?

Because the user wants to be the preview of the graph before committing it.  That's one of those UI features that we take for granted in modern apps.  So, we are not going to remove it or else the app would look and feel like a 20th century app.
Comment 10 QA Administrators 2014-06-25 17:38:03 UTC
Please read this message in its entirety before responding.

Your bug was confirmed at least 1 year ago and has not had any activity on it for over a year. Your bug is still set to NEW which means that it is open and confirmed. It would be nice to have the bug confirmed on a newer version than the version reported in the original report to know that the bug is still present -- sometimes a bug is inadvertently fixed over time and just never closed.

If you have time please do the following:
1) Test to see if the bug is still present on a currently supported version of LibreOffice (preferably 4.2 or newer).
2) If it is present please leave a comment telling us what version of LibreOffice and your operating system.
3) If it is NOT present please set the bug to RESOLVED-WORKSFORME and leave a short comment telling us your version and Operating System

Please DO NOT
1) Update the version field
2) Reply via email (please reply directly on the bug tracker)
3) Set the bug to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 11 Jean-Baptiste Faure 2014-06-28 17:59:31 UTC
Thank you for the reminder :-)

Tested again with LO 4.2.6.0+ and LO 4.3.0.1.0+ under Ubuntu 14.04 x86-64.
- in LO 4.2.6.0+ the diagram is updated when I change the second value of the data range if I am not fast enough to change the first value after the second one.
- in LO 4.3.0.1.0+ the diagram is not updated until I click the OK button or I move to the other tab of the dialog. I did try to change the second data range value and wait doing nothing, the diagram is not updated. I guess that the solution proposed by Kohei in comment #7 has been implemented, but I can't be sure. So closing as WorksForMe.

Best regards. JBF
Comment 12 Robinson Tryon (qubit) 2015-12-15 11:05:13 UTC
Migrating Whiteboard tags to Keywords: (perf)
[NinjaEdit]