Issue 116758

Summary: Impress forces excessive Xorg utilization and eventually crashes the window manager
Product: Impress Reporter: plangfelder <peter.langfelder>
Component: editingAssignee: Armin Le Grand <Armin.Le.Grand>
Status: CLOSED FIXED QA Contact: issues@graphics <issues>
Severity: Trivial    
Priority: P3 CC: cno, issues, philipp.lohmann
Version: OOO330m20   
Target Milestone: ---   
Hardware: Other   
OS: Unix, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 120237    

Description plangfelder 2011-02-02 03:48:03 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.
Comment 1 wolframgarten 2011-02-02 07:31:07 UTC
Reproducible. Reassigned.
Comment 2 cno 2011-02-02 07:52:05 UTC
related to 105116 ?
Comment 3 groucho266 2011-02-02 10:57:43 UTC
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.
Comment 4 Armin Le Grand 2011-03-14 16:39:26 UTC
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.
Comment 5 Armin Le Grand 2011-03-14 16:40:31 UTC
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...?
Comment 6 philipp.lohmann 2011-03-14 16:52:10 UTC
Indeed I do: don't do that 20000 times for just one object (see af's comment)
Comment 7 Martin Hollmichel 2011-03-15 11:07:45 UTC
set target to 3.x since they are not release relevant for 3.4
Comment 8 Armin Le Grand 2012-01-05 11:28:15 UTC
ALG: Taking a look, trying to add buffering for used VirDevs...
Comment 9 Armin Le Grand 2012-01-10 12:44:11 UTC
ALG: Comitted buffering implementation, VDevs get now reused and freed if not needed after 10 seconds. Done.