project-navigation
Personal tools

Author Topic: Very High (Process-)Priority  (Read 4762 times)

Offline Darkpriest667

  • Squad Leader
  • ****
  • Posts: 149
    • View Profile
Very High (Process-)Priority
« on: January 12, 2009, 01:15:12 pm »
Repeatedly.. for some reason no matter what i have tried... this program opens and the priority is set to very high.... now i wouldnt mind that except it causes my whole system to lag like crazy and usually takes me 15 to 20 minutes to reset to medium where it belongs JUST LIKE EVERY other program for windows... Why is the default startup priority very high.. and how can i change it to default to medium... I have tried everything i know and I cannot fix it...


If you can in the next release please set the default startup of the program to medium priority... its a major pain in the behind
« Last Edit: January 14, 2009, 07:57:42 pm by Mattn »

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Developers read this
« Reply #1 on: January 12, 2009, 01:32:05 pm »
It's normal on my system.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Developers read this
« Reply #2 on: January 12, 2009, 01:35:21 pm »
If I remember right, I think there is a command-line switch for ufo.exe that can change the priority it runs at, so you can start the game at a different setting.

I've also noticed that the game tends to remember the last settings used in many cases.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Developers read this
« Reply #3 on: January 12, 2009, 01:39:16 pm »
Found it: it is a cvar called "sys_priority"

There is also "sys_affinity" which controls how many cores and which ones are used on a multi-core machine.

From memory, I think it is something like:

ufo.exe +set sys_priority 0

I might be off a bit on the syntax, but I think that's clsoe to what you want.  ("0" is for "normal" priority, while "1" and "2" are for higher ones.)  The console has the command "cvarlist" which I think lists all the potential switches.
« Last Edit: January 12, 2009, 01:42:00 pm by Destructavator »

Offline Darkpriest667

  • Squad Leader
  • ****
  • Posts: 149
    • View Profile
Re: Developers read this
« Reply #4 on: January 13, 2009, 04:06:45 pm »
where is the default file path folder.. ill change it immediately.. and no it doesnt remember the last setting as i have had to reset it every time since i installed 2.2.1

Offline Darkpriest667

  • Squad Leader
  • ****
  • Posts: 149
    • View Profile
Re: Developers read this
« Reply #5 on: January 14, 2009, 07:30:31 am »
ive done two thorough searches and cannot find the cvar you are talking about... could you throw me a bone here and let me know... I havent been playing the game because of this bug and everytime i reset the program to normal priority it goes back to very high the next time i load it.. too annoying to deal with really

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Developers read this
« Reply #6 on: January 14, 2009, 12:21:59 pm »
Did you try putting that setting in your config.cfg? (just an idea)

-geever

Offline Darkpriest667

  • Squad Leader
  • ****
  • Posts: 149
    • View Profile
Re: Developers read this
« Reply #7 on: January 14, 2009, 02:36:11 pm »
found the file path for the ufo ai config.cfg.....


C:\Documents and Settings\"yourcomputernamehere"\Application Data\UFOAI/2.2.1/base/config.cfg


direct quote from both files had the default setting to high... I have no changed that default to normal in the text and in the config.cfg i have changed it from 1 to 0


Hopefully this will end any confusion...


Administrator can this topic please be moved to the windows help section and renamed system priority very high or something to that effect to help others that may experience the same problem... Thankyou :-)

Offline Salvo

  • Rookie
  • ***
  • Posts: 37
    • View Profile
Re: Very High (Process-)Priority
« Reply #8 on: March 07, 2009, 05:14:01 pm »
This is so wrong. I thought there was something seriously wrong with my machine since I started getting those random freezes too. Overheating or a dying motherboard / power supply / video card came into mind at first... and in my case overheating seemed so unlikely. And all this time the freezes were caused by this rather covert setting of High Priority. Devs: Might want to consider putting that config file into the game installation folder, instead burying it in the Application Data of XP.

Lesson learned. If a program freezes, check its priority. Honestly, I would've defaulted the whole thing to Normal and made a separate mention in a little paragraph titled "How to increase UFO:AI performance", along with a warning that other programs might suffer if the priority is changed. But that's just me.

Not only all this, setting
set sys_priority "1" gives High Priority but
set sys_priority "0" gives Normal.
There is no option for AboveNormal, which is between those two :| (though you can change it in the TaskManager if you AltTab out of the game after starting it, which is always an annoyance)

Curiously, the freezes didn't occur from the beginning, but later in the game. And only after 15 minutes of playing a tactical mission. Although this has been a bit troubling experience, something positive did come out of this. It made me look inside my PC case and noticed one of the case fans wasn't operating. Apparently forgot to replug it a month back while installing new hardware.

Also, if any of you get a freeze during a mission, don't hit the reset button on your PC case immediately. The freeze might pass or let go for a moment after a minute or two (move your mouse cursor around every 10 seconds or so to check). I witnessed this several times. That's your chance to exit the game.

EDIT: Looks like the culprit was my mouse after all. Switched mouse and got no more 1-2 second pauses (in High they were untolerable, in Normal manageable). However, running the game in High process priority wasn't still a good idea. Background processes still suffered.
« Last Edit: March 09, 2009, 11:09:17 pm by Salvo »