Apache OpenOffice (AOO) Bugzilla – Issue 96237
Opening embeddedl form causes massive memory allocation
Last modified: 2013-08-07 14:43:11 UTC
Test machine: AMD 3300+, 1.5 gig RAM OS: Ubuntu 8.10 (x64) OO.o: DEV300_m35 (x64) JRE: SUN 1.6.0_10 To reproduce you need to download the following file: http://www.ninthavenue.com.au/products/gemstone-ledger/downloads/gemstone-0.4.0.zip Unzip the file to any location - the file gemstone.odb was a prototype created with OO.o 2.2 For this test all user applications other then OO.o where closed. Checking system resources before any OO.o was loaded - CPU 1%, RAM 16%, Swap 3% Startup OO.o 3.0 (x64), open the ODB file with OO.o 3.0 (x64) and then open the form "User Manual". The form opens on the screen in ~3 seconds and the system resources: CPU usage never exceeds ~81% RAM 20% Swap 3% Close OO.o 3.0 Startup Dev300_m35, open the ODB file and then the form "User Manual". The form (when no other applications are active) opens in about 11 seconds and the system resources: CPU usage hits ~99% for about half this time RAM peaks at 98% then fluctuates as the swapping mechanisim kicks in, but eventually stabilizes at ~96% Swap: 23%
Created attachment 58016 [details] Screen shot with system sensors for OOo 3
Created attachment 58017 [details] Screen shot with system sensors for Dev300_m35
Acer Aspire 5102, Turion64 1.8Mhz 2GB RAM OS: openSuSE 11.0 OOo: DEVm35(x64) JRE: SUN 1.6.0_7 Similar results, OOo nearly hangs and scrolling in opened User Manual is very slow.
Well - can't believe I didn't do this yesterday. Saved the 'User Manual' form as a stand alone .odt file. Opening in m35 behaves just as badly as when embedded. Changing component to Word Processor.
Similar on winXP SP3, same Aspire, not so slow as under linux, but similar. Standalone document I found problems with inserted graphics, attach two screenshot one with 3.0 no problem, and m35 graphic not in place, slides above text.
Created attachment 58027 [details] 3.0 screenshot
Created attachment 58028 [details] m35 graphics slide above text
Can reproduce on WinXP. The problem seems to be in Writer: "Save Copy as..."-ing the offending form to a separate text document, the problem persists. Also, the document does not contain any form controls at all.
Created attachment 58051 [details] separated the text form from the database document
fs->od: see the attached "Gemstone User Manual.odt" document, which performs extremely bad in m35 in both opening and scrolling. Also, some of the images therein are painted at wrong locations and with wrong scales - see page 2, for example. fs->aw: cc'ing you. My gut feeling tells me this might be related to your changes in the drawing layer (I could refrain from using the expression "primitive changes", which would be way too ambiguous here :) which came in with m30.
Seems to be broken in DEV300m30. Rendering, Positioning and Performance Ok in DEV300m29. OOo 3.0 is also Ok. OD->AW: Can you please have first a look on the rendering and the performance, because I did not see any changes made in DEV300m30 in project Writer, which are not also included into OOo 3.0? Thx.
AW: Looking at the file. Indeed, some of the graphic objects at the left page column are misaligned and wrongly scaled. Taking a look what kind of object it is (Drwainglayer or writer graphic object or something else). When deleting that object(s), all is okay, so the performance has definitely to do with it. AW: It's a SdrRectObj with tiled bitmap filling. It may be a problem in the processing of the primitive fill attributes (createNewSdrFillBitmapAttribute). There, an adaption for GetPrefMapMode is done for the used Bitmap. The bitmap in question has a PrefMapMode of MAP_100TH_MM, but gets converted using PixelToLogic, and MAP_TWIP is used for SetPrefMapMode, this is definitely wrong. Checking if this was done different in pre-primitive versions... AW: Indeed. Rendering and performance is because of svx/source/sdr/primitive2d/sdrattributecreator.cxx in createNewSdrFillBitmapAttribute, line 574: To change, exchange line aBitmap.SetPrefSize(Application::GetDefaultDevice()->PixelToLogic(aBitmap.GetPrefSize(), aDestinationMapUnit)); with line aBitmap.SetPrefSize(Application::GetDefaultDevice()->LogicToLogic(aBitmap.GetPrefSize(), aBitmap.GetPrefMapMode(), aDestinationMapUnit)); This resolves the wrong bitmap scalings and the performance stuff. Also, the first such object on page one is correctly positioned. Unfortunately, the objects on the following pages are not. They seem to be anchored to the Header (???) and are displayed at the next page, not on the one where their anchor is. AW->OD: Please use above line to fix the performance problem. Unfortunately, You will have to look for the wrong positioning. HTH.
OD->AW: Thanks for the fast reply and the fast fix for the rendering and performance problem. I will take care of the wrong positioning. Question: Should I check-in your fix or will you take care of this fix?
AW->OD: Please check in. I will also add it to my current CWS, but it should come together with Your evtl. fixes for this issue. It should merge with no big issues.
In the meanwhile the positioning issue has been fixed in cws aw061, issue 97197. I will check-in the patch from AW in cws sw31bf04.
Now, I figured out that AW's patch is already applied in cws aw059, which is integrated into coming DEV300m39. Thus, nothing else to do -> FIXED
OD->MRU: Please verify solution for rendering/performance issue in DEV300m39 and solution for positioning issue in DEV300 master, which has cws aw061 integrated. Thx.
Checked fix in OOO310m7.