Apache OpenOffice (AOO) Bugzilla – Issue 116758
Impress forces excessive Xorg utilization and eventually crashes the window manager
Last modified: 2017-05-20 10:33:57 UTC
When working on a particular presentation (available at http://peterlangfelder.com/presentation.odp) impress intermittently slows down for several seconds up to a minute while CPU usage by Xorg goes up to nearly 100%. It happens when viewing slides for the first time and also when trying to edit them; for example, typing text becomes nearly impossible because the letters won't appear on screen until say 20 seconds later. The worst thing is that this seems to get worse as time goes on. At first I was able to switch to a different window and check CPU usage; then window changes became slow, and in the end the window manager didn't let me switch windows at all (although all programs continued to run with screen output) and I had to switch the computer off.
Reproducible. Reassigned.
related to 105116 ?
At least one part of the problem seems to be a larger number of MaskPrimitive2D objects. For the metafile object on page 64 of the document mentioned above, more than 20000 mask primitives are rendered. With the current definition of the mask primitive this is quite expensive.
AW: The definition is not the problem, a renderer is free to use the MaskPrimitive to set a ClipRegion at the target device. Problem is that setting a clip region in X will not produce AAed edges which is needed with AA enabled. To do that, the current mechanism is necessary (copying target in VDEV, painting masked context, generate AAed mask (8bit), combining to BitmapEx with RGBA and copying back). If someone knows a better mechanism on X without losing AAed bounds I would be happy. AW: Currently no workaround.
AW: The definition is not the problem, a renderer is free to use the MaskPrimitive to set a ClipRegion at the target device. Problem is that setting a clip region in X will not produce AAed edges which is needed with AA enabled. To do that, the current mechanism is necessary (copying target in VDEV, painting masked context, generate AAed mask (8bit), combining to BitmapEx with RGBA and copying back). If someone knows a better mechanism on X without losing AAed bounds I would be happy. AW: Currently no workaround. AW->PL: Adding you to CC. Maybe You have an idea...?
Indeed I do: don't do that 20000 times for just one object (see af's comment)
set target to 3.x since they are not release relevant for 3.4
ALG: Taking a look, trying to add buffering for used VirDevs...
ALG: Comitted buffering implementation, VDevs get now reused and freed if not needed after 10 seconds. Done.