Lots of Timers Question
Posted
#1
(In Topic #1071)
Regular

I'm currently working on a ambitious and big project with several timers on each form. Does having too many timers doing different things cause bottlenecks because I'm getting unexpected behavior and things either don't fire off or end up way slower than they should be. I guess what I'm asking is how exactly do multiple timers on a form work? I could be totally wrong here and the weird behavior isn't being caused by the timers but that's just what I'm suspecting at the moment. Is there a better way than timers to handle all the things needing to be done in the background? Would dividing up all timers into their own forms (and then hiding them) work? Thanks for any input.
Posted
Guru

/comp/gb/task - Gambas Documentation
a timer is not a true "background task" timer code will still be run synchronously so each timer trigger running is like a normal function that your program runs (one at a time through the event loop)
for true background tasks use Task.class
Posted
Guru

What Delay are you putting on your timers?
What are the timers doing, if they are working out the nth Prime Number it may well be slow?
Gambas only uses one of your processor cores to run unless you use Task as Bruce has pointed out. Have a look at this post that may help. I was able to get all 8 cores running in Gambas.
Posted
Regular

Posted
Regular

1 guest and 0 members have just viewed this.


