Setting application priority

I am working on a project that reads in data and processes it in as close to real time as possible. Data comes in on a periodic basis, gets process and the results displayed to the user. Speed is of the essence and I have several processes running as threads in the background. Can I speed up my program by somehow telling the Mac OS that I want it to have the highest priority of all processes running on the Mac? Can this be done in within the Xojo build?

There is a shell command called “nice”. I remember playing around with it. It makes the app faster. But then it behaves very un-nice to other apps. I think the app has to be restarted after the values changes.

Unless you are very comfortable tinkering around in OS X, you should be very careful doing this. It would be all too easy to make it impossible for the OS to actually operate if you combined this with a long, high cpu process.

Normally it is better to use renice to keep processes responsive.

E.g. Use shell with

Renice pid 20

Where you replace pid with your own process ID.

Thank you all for the nice and renice command options. I think I do not want to mess around too much with application priority but rather focus on the how the I can get the code to run faster. Now to try and learn/understand multiprocessing!