is impact of acquiring cpu wake lock increases by no of applications holding it in android?

227 views Asked by At

I used this application from play store to identify the applications holding CPU locks and turned out almost entire suite of google apps along with a few third party application have acquired CPU wake locks.

I am amazed that even google was using it extensively while it discouraged holding it as it drains battery. Kind of defeats the purpose of wake triggers if cpu never goes to sleep.

So I was wondering whether the no of applications holding the cpu wake lock affects the performance if most of them are just network application waiting for a server response.

because if it doesn't then the recommended practise of not to acquire it would mean nothing in practical devices as some application would likely be holding the wake lock, and when its google apps themselves you won't wanna avoid it anyway.

1

There are 1 answers

0
Larry Schiefer On

It's not really a matter of how many apps have wake locks, but rather how they are being used. If the wake lock is only used in small windows (eg acquired for a short period of time) then its impact should be minimal. Google recommends not using them because they can be easily abused or forgotten to be released, thus preventing the system from sleeping.

Starting with marshmallow, the use of wake locks is mitigated by the platform when on battery and idle as doze mode ignores wake locks.