3 ms·
"App Nap can be automatically triggered if an app’s windows are not visible and the app is not playing audio..." When they say foreground and background they're
by wmf 13y ago
"App Nap can be automatically triggered if an app’s windows are not visible and the app is not playing audio..." When they say foreground and background they're taking about the GUI.
BTW, "developers can explicitly make an app ineligible for App Nap by using the existing IOKit IOPMAssertion API (used today in OS X to prevent the system from sleeping while an app is busy)."
- masklinn 13y agoThe developer documentation goes into more details: > App Nap reduces power consumption by completely suspending your app’s execution when it meets certain criteria. This ensures that your app does not periodically wake up to do unnecessary work. An app is considered to be a candidate for sleep if: > * It is not visible—if all of an app’s windows are either hidden by other windows or minimized in a hidden dock, and the app is not in the foreground > * It is not audible > * It has not explicitly disabled automatic termination > * It has not taken any power management assertions > When all of these conditions are met, OS X may put the app to sleep. While asleep, the app is placed on a scheduling queue that rarely gets actual time on the CPU. There are also new methods provided on NSProcessInfo to temporarily prevent sleep and increase scheduler timer precision.