From 22% of cpu in hasTransientInternal to 0.2x%
Summary: According to callgrind, checking kwin in release with debug symbols, 22% of cpu time in the method hasTransientInternal is spent doing a cast to Client *, while at the begining of the method, the cast to const Client * only uses 1.0x%. Test Plan: The workload was just show 50 messagebox copying small files and being unable to change the permissions. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D9982
This commit is contained in:
parent
1e09646791
commit
2c7b1cf762
1 changed files with 1 additions and 1 deletions
|
@ -726,7 +726,7 @@ bool Client::hasTransientInternal(const Client* cl, bool indirect, ConstClientLi
|
||||||
for (auto it = transients().constBegin();
|
for (auto it = transients().constBegin();
|
||||||
it != transients().constEnd();
|
it != transients().constEnd();
|
||||||
++it) {
|
++it) {
|
||||||
Client *c = dynamic_cast<Client *>(*it);
|
const Client *c = qobject_cast<const Client *>(*it);
|
||||||
if (!c) {
|
if (!c) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue