Jurgen A Doornik

When using OS X 10.9 (Mavericks), the model formulation dialog of PcGive/STAMP/G@RCH sometimes takes a long time to appear. We have now discovered that this is caused by a feature that is called App Nap.

App Nap is a technology introduced with OS X 10.9 (Mavericks) to reduce energy consumption. While it may achieve that aim, the algorithm that decides candidates for App Nap is not always so successful. In particular, applications that wait for a signal to present themselves to users are negatively affected. This includes OxModel, which implements PcGive, G@RCH, and STAMP. OxModel waits for instructions from OxMetrics (such as request to show the model formulation dialog). Because this waiting happens in the background, OxModel is a candidate for App Nap. When it is put to sleep, it can take up to 10 seconds for OxModel to respond to a request from OxMetrics. At the same time, the facilities to control this feature are in terms of user preferences, rather than application properties.

The Activity Monitor shows under the energy tab whether an application is AppNappping. It can be seen that activating the dock wakes all applications from App Nap.

To make OxMetrics behave properly, it is best to switch off App Nap for OxModel and OxRun. The next version, 7.1, will do this automatically. In the mean time, users of OxMetrics version 7.0 (or 6.x) can avoid the problem by switching it off manually. This can be done in two ways:

  1. Disabling App Nap from the Finder::

    Locate OxModel in /Applications/OxMetrics7/bin/OxModel, Ctrl+Click on it to activate the context menu, select Get Info and click on Prevent App Nap:

  2. Disabling App Nap from a Terminal window:

    To disable App Nap for OxModel:
       defaults write com.oxmetrics.OxModel NSAppSleepDisabled -bool yes

    To check the settings of App Nap for OxModel:
       defaults read com.oxmetrics.OxModel NSAppSleepDisabled

    To remove the App Nap settings for OxModel:
       defaults delete com.oxmetrics.OxModel NSAppSleepDisabled

    For OxRun use com.oxmetrics.OxRun.