eliminating windows bg services...
eliminating windows bg services...
is there any way to run a FB application so it automatically halts/pauses all unnessesary bg services? it causes jerkyness for my scolling engine (i.e. when the HD is being accessed by other applications.) ahhh, how i miss the dos age, no jerkyness.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
ok, i read a bit about threads, i have a few questions. Does creating a thread for a function allow that function to be processed in paralel with other functions? If so, wouldn't background processes still interfere? Would I be able to thread my entire program so nothing interferes with it? that wold be nice. I'll need more examples of how to implement threads though, and a bit more about threads in general. Anybody know any good tutorials, preferably for FB?
-
- Posts: 836
- Joined: Jul 28, 2005 13:56
- Location: Brazil, Santa Catarina, Indaial (ouch!)
- Contact:
you can change the priority of your main program, but be caution with 100% cpu usage, that can cause instability...
in windows...
windows have a thing called priority booster that can mix up things, but increasing priority is a good solution, in many cases.
in windows...
Code: Select all
#include "windows.bi"
SetPriorityClass(GetCurrentProcess, HIGH_PRIORITY_CLASS)
' and continue with the program
damn, the windows include file conflicts with the allegro include with the BITMAP structure and other things. I might have to rename them all. Unless someone knows another way around this? I've looked into the windows include file and noticed there's probably many of those secondary include files that I don't need in order to use SetPriorityClass. Maybe omiting the ones i don't need will solve this.
try this instead of
do this
Code: Select all
#Include "windows.bi"
Code: Select all
#IncLib "kernel32"
Declare Function SetPriorityClass Alias "SetPriorityClass" (ByVal As Any Ptr, ByVal As uinteger) As Integer
Declare Function GetCurrentProcess Alias "GetCurrentProcess" () As Any Ptr
-
- Posts: 836
- Joined: Jul 28, 2005 13:56
- Location: Brazil, Santa Catarina, Indaial (ouch!)
- Contact:
hum.. the HD acess isnt part of your program? well, if you use XP and your ram are above of 256mb, it can be a program that you have installed into your computer that are making those HD acess, but yes, windows have almost highest priority when acess HD, but the access is trough DMA, then the amount of data that you hd are acessing in this random time are big, or the program is in an high priority, you can search for that program in the TASKMGR (ctrl+alt+del), ^^Ophelius wrote:I don't think it's my source. It's jerky because of random HD accesses Windows makes in the BG. It's smooth when the HD isn't being accessed.