Merge lp://staging/~sil2100/compiz-core/cherry_3236_3237 into lp://staging/compiz-core
Status: | Merged |
---|---|
Merged at revision: | 3106 |
Proposed branch: | lp://staging/~sil2100/compiz-core/cherry_3236_3237 |
Merge into: | lp://staging/compiz-core |
Diff against target: |
101 lines (+29/-14) 3 files modified
include/core/option.h (+1/-0) src/event.cpp (+20/-14) src/option.cpp (+8/-0) |
To merge this branch: | bzr merge lp://staging/~sil2100/compiz-core/cherry_3236_3237 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Approve | ||
Review via email:
|
Commit message
Cherry-picked from compiz trunk (revs 3236, 3237):
Avoid constructing and destructing lots of strings on every single event, which was wasting lots of CPU (LP: #1005569)
Improve the fix for LP: #1005569:
Calling CompOption::setName should not implicitly construct a new string object every time, when the name is not changing.
This is also an alternative fix to the previous commit, but both together don't hurt either.
Description of the change
A cherry-pick of:
https:/
https:/
Original descriptions:
Calling CompOption::setName should not implicitly construct a new string
object every time, when the name is not changing. That wastes lots of CPU.
(LP: #1005569)
Avoid constructing and destructing lots of strings on every single event,
which was wasting lots of CPU (LP: #1005569)
The ugly refactoring in src/event.cpp of mine is not required and only adds risk if you have the setName change already.
However, this fix is approved upstream, it's still smaller than many other changes being backported, and I'm running it right now and don't see any problems (other than bug 1014957).