SCNRenderer slower in foreground

I am using a SCNRenderer to render 120 frames without a SCNView (so nothing is showing in UI) on macOS and realised that the task is twice faster if the app is minimised or if I go full screen on another app. Why would that be? ideally I'd like this performance with my app in the foreground.