5

I am developing a server-side application using Java and OSX and quite often I have to run a rather large test suite to make sure everything is alright. I am using IntelliJ IDEA (Java-based IDE).

When I use one workspace only, tests finish in about ~3 minutes no matter whether the IDE has focus or not. It just has to be in the same workspace.

When I move the IDE to a different workspace (so I'd have 2 workspaces) or into fullscreen mode (which essentially creates a new workspace), test execution is ~100% slower (takes about 6 minutes).

When I keep the focus in the second workspace for the whole execution time period, we're back to ~3 minutes.

This is really puzzling to me. I measured it using various number of workspaces and various number of applications per workspace, same results.


Clarification from the discussion from the comments, to avoid confusion:

If the focus in in the workspace with the IDE or full-screen IDE, it's fast. Once the focus is on a different workspace (so the IDE is either on a different workspace or in a full-screen mode (but with no focus)) then it is slower.

  • 1
    100% slower is dead you mean runs at 50% speed or the one workspace is 100% faster – Mark May 18 '16 at 11:03
  • @Mark it means that it runs at 50% speed – Xorty May 19 '16 at 10:06
  • I worked out that is what you meant but you have not written what you meant – Mark May 19 '16 at 10:08
  • more importantly as per comments in answer the full screen timing seems to conflict with running not having focus – Mark May 19 '16 at 10:09
  • Fullscreen is just a different workspace, right? So nothing changes here - if you're focused in the fullscreen app it's fast, if you're not it's slow. Same for workspaces. – Xorty May 19 '16 at 10:10
-1

It part of OS X itself to optimize the resources and to keep wise balance between foreground process and background tasks. Operating system devotes more resources to the active workspace, and to put less CPU processing capacity to the background tasks.

Benefits are obvious:

  • the higher responsiveness for user of the system in the overall for the foreground process;
  • and less CPU load (less heat is produced, CPU fan is quiet), lower impact on the battery life.

It should be clearly visible with Activity Monitor App, how much power system devotes to specific process.

  • But if OP is in full screen he says it is slower – Mark May 18 '16 at 11:02
  • @Mark, no, OP said, that when the work-space kept focused - it backs to normal, to regular execution time. And it's exactly about that. – Farside May 18 '16 at 11:06
  • "When I move the IDE to a different workspace (so I'd have 2 workspaces) or into fullscreen mode " so it is also in fullscreen mode – Mark May 18 '16 at 11:09
  • @Mark, and how about the next line? > When I keep the focus in the second workspace for the whole execution time period, we're back to ~3 minutes. – Farside May 18 '16 at 11:12
  • 1
    Sorry for the confusion - it is as Farside says, if the focus in in the workspace with the IDE or fullscreen IDE, it's fast. Once the focus is on a different workspace (so the IDE is either on a different workspace or in a fullscreen mode (but with no focus)) then it is slower. – Xorty May 19 '16 at 10:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .