[callgrind] compiz spends about 51% of its CPU time in CompRegion construction/destruction
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Compiz Core |
Fix Released
|
High
|
Daniel van Vugt | ||
compiz (Ubuntu) |
Fix Released
|
Undecided
|
Daniel van Vugt |
Bug Description
I've only been profiling compiz with callgrind for a while, but the first thing that stands out as unusual is CompRegion. It appears to be such a heavily used class that compiz spends 51% of its CPU time constructing and destructing CompRegions...
1,173,358,129 = total execution time
223,504,551 = time in (and below) CompRegion:
218,441,501 = time in (and below) CompRegion:
158,941,179 = time in (and below) CompRegion:
The primary reasons for this slowness appear to be:
(a) XCreateRegion is slow.
(b) new/delete is too slow to be used as frequently as CompRegion uses it.
Instead of fixing CompRegion itself though, we should first look at the call graph and see if there are any callers that dominate.
Related branches
- Alan Griffiths: Approve
-
Diff: 420 lines (+105/-96)6 files modifiedinclude/core/region.h (+12/-4)
plugins/decor/src/decor.cpp (+20/-12)
plugins/decor/src/decor.h (+1/-0)
plugins/opengl/src/paint.cpp (+2/-2)
src/privateregion.h (+0/-41)
src/region.cpp (+70/-37)
Changed in compiz-core: | |
milestone: | 0.9.7.2 → 0.9.7.0 |
Changed in compiz-core: | |
status: | Fix Committed → Fix Released |
Inclusive subroutine costs.