How to block your App to Nap (macOS AppNap) #318
claudiofantacci
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
AppNap
is macOS feature introduced with Yosemite (10.9) to improve battery life and system responsiveness. To achieve this goal, every application that is deemed to be on the background is slowed down. As a mac user, you probably have never cared too much about it: your mac runs smooth and the battery last long. As a developer, however, you should be worried about this feature and, in particular, how the OS deems an app running in the background and, I quoteIf you reached this post, you probably noticed some strange performance issues/variations of your application (may it a console or a window application) and noticed something like this in the AppNap column of Activity Montior
If you happen to be here by chance, well, your application may be slowed down by your system and you weren't aware of it.
macOS provides interfaces to disable AppNap on application basis and YARP, after robotology/yarp#1354, is provided with a feature to just do it!
To disable
AppNap
you just need the following 3 lines of code to your YARP app:Beta Was this translation helpful? Give feedback.
All reactions