Click to See Complete Forum and Search --> : Real time proccess
Samuel Viguria
June 21st, 1999, 08:33 PM
I am using Visual C++ 5.0 in order to proccess an image (filters, fft, etc). My MFC application already works, but I think it would be
faster if I could change its priority class (normal) to high or real-time.
Could someone, please tell me how to change it?
Thanks in advance
Samuel
June 21st, 1999, 10:53 PM
Not really you can increase the performance tremendously, unless that you have many applications running at the same time (which is not good for your case and you don't want to run many applications). Windows has some background work to do but should not be a big chunk of CPU time. Therefore, if you are running your image processing as the major application in the windows, it pretty much uses all CPU time, and change of priority won't increase the performance. You can use the system monitor to check the use of CPU time (or Taskmanager in NT).
ytsau
Peter Hendrix
June 23rd, 1999, 07:53 AM
Thanx for the information,
however IF you are running a lot of different processes, it CAN increase processingtime if you increase the priority. You should notice that you should not use this for every program, be very selective with it otherwise the whole purpose of the idea will be lost.
If you want to set the priority, you can add the following code to the Initinstance of your application.
SetPriorityClass(GetCurrentProcess(),HIGH_PRIORITY_CLASS);
I hope this helped you.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.