Issue 101925 - Performance: metafile creation is requested superfluously during inplace editing
Summary: Performance: metafile creation is requested superfluously during inplace editing
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: joerg.skottke
QA Contact: issues@graphics
Keywords: performance, regression
Depends on:
Reported: 2009-05-14 15:59 UTC by IngridvdM
Modified: 2013-02-24 21:19 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

patch to fix sub-problem with pdf export (2.50 KB, text/plain)
2009-05-26 16:29 UTC, IngridvdM
no flags Details
example for testing (6.54 MB, application/vnd.oasis.opendocument.spreadsheet)
2009-06-05 16:17 UTC, IngridvdM
no flags Details
example with some different OLE objects (31.35 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-06-05 16:29 UTC, IngridvdM
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description IngridvdM 2009-05-14 15:59:45 UTC
Create a chart and change it via a normal dialog within the chart edit mode. For
example change the axis scale via the axis properties dialog.
After clicking ok while still in edit mode a replacement image is requested from
the chart. This call is superfluous as the replacement image is not used during
edit mode.
The superfluous call can be quite expensive for bigger charts so this is
performance relevant.
Comment 1 IngridvdM 2009-05-14 16:17:58 UTC
I identified the superfluous call coming from
ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence, currently working on a
solution and testing.
Comment 2 IngridvdM 2009-05-22 14:10:35 UTC
The current fix breaks pdf export. Have to debug further.
Comment 3 Mathias_Bauer 2009-05-25 14:28:53 UTC
Target changed to a better one (2.3 is gone since quite some time ;-))
Comment 4 IngridvdM 2009-05-25 15:29:02 UTC
This was of course only transposed digits. It should have been 3.2. I correct
the target again.
Comment 5 IngridvdM 2009-05-26 16:22:24 UTC
@aw, the pdf export is broken because ChartPrimitive2D::getB2DRange() does
return an empty range as no concrete primitive is available at that moment.
ChartPrimitive2D::getB2DRange() so far was simply the base class implementation.
I have overloaded that method and implemented it thus now the size is retrieved
directly from the chart model and not from the primitive sequences anymore. The
new solution works fine so far. Please have a look at the attached patch as this
is your code area. Thanks in advance!
Comment 6 IngridvdM 2009-05-26 16:29:04 UTC
Created attachment 62541 [details]
patch to fix sub-problem with pdf export
Comment 7 IngridvdM 2009-05-27 14:59:50 UTC
@aw, thanks for the off-line review! I have tested the discussed changes and
they work fine. The pure transformation is sufficient for the calculation of the

Fixed in CWS dr70.
Comment 8 IngridvdM 2009-06-05 16:17:06 UTC
Created attachment 62801 [details]
example for testing
Comment 9 IngridvdM 2009-06-05 16:28:26 UTC
->jsk, please verify in CWS dr70.
For testing load the attached document BigLineChart.ods, switch off the tip help
to avoid arbitrary repaints, double click the chart, double click  the y-axis
and set the scale maximum to 95. Click ok and move the mouse left and right to
see when the chart is ready for new user actions (pointer changes dependent on
where you are).
Observe how long the time is from clicking ok until the chart is repainted with
the new maximum and is ready for further user actions again.
On my computer it takes:
dev300m49: ~1 minute and 13 seconds
CWS dr70: ~12 seconds

The changed code is a quite central place that potentially affects the painting
of all OLE objects. So please ensure that other OLE objects and the chart are
still painted correctly on screen, pdf export and printing. I'll attach a small
example with some different OLE objects.
Comment 10 IngridvdM 2009-06-05 16:29:13 UTC
Created attachment 62802 [details]
example with some different OLE objects
Comment 11 IngridvdM 2009-06-08 08:48:18 UTC
@jsk, please also ensure that OLE objects are
still painted correctly on screen while in edit mode and not in edit mode. Thanks!
Comment 12 joerg.skottke 2009-07-01 06:38:16 UTC
My mesurements show even better performance gain - 1:34 / 0:11.
Tested OLE objects (Add new, editing, add more, edit more, switch between
objects, move, resize) and calc related OLE object autotests succeeded.

Comment 13 joerg.skottke 2009-10-09 08:11:42 UTC