[09 Dec 2007] Priority

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

[09 Dec 2007] Priority

Post by Juan Carlos »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 9 Dec 2007 18:06:34 +0100 (CET)

Hello Andreas:

How I can change the priority in the Hollywood programs? because when I programmed one application the program with Hollywood take the CPU speed when there are others programs working in parallel, and also I have other doubt, the InstallEvenHandler for read the keyboard touch is any slow also there is some way for avoid it? and when I play some key as ESC the effect be itso facto? because now the action wait the cycle of the program.

Best regards from your friend Juan Carlos.
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[27 Dec 2007] Re: Priority

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 27 Dec 2007 00:13:18 +0100
Hello Andreas:

How I can change the priority in the Hollywood programs? because when I programmed one application the program with Hollywood take the CPU speed when there are others programs working in parallel, and also I have other doubt, the InstallEvenHandler for read the keyboard touch is any slow also there is some way for avoid it? and when I play some key as ESC the effect be itso facto? because now the action wait the cycle of the program.
If a Hollywood program eats up all your CPU, it's probably not written correctly. Make sure that you do not use any polling loops. E.g. something like this is bad:

Code: Select all

Repeat
	p_GameLoop()
Forever
This would eat up all your CPU. Instead use a timer to ensure that the game loop isn't executed more often than 30 times a second or so, e.g.

Code: Select all

; run p_GameLoop 30 times per second
SetInterval(1, p_GameLoop, 1000 / 30)

Repeat
	WaitEvent
Forever
And to answer your question: There's NO WAY to give Hollywood a higher priority because that's not what it was meant for. Hollywood was concepted to run smoothly in a multitasking environment, side by side with other programs.
Locked