Thread View: comp.sys.amiga.tech
3 messages
3 total messages
Started by Phil Dietz
Mon, 17 Dec 1990 22:09
INTUITICKS Problem!
Author: Phil Dietz
Date: Mon, 17 Dec 1990 22:09
Date: Mon, 17 Dec 1990 22:09
15 lines
1131 bytes
1131 bytes
I'm writing a program that does a BUNCH of calulations (3d ray trace
stuff). Well as it turns out, if I put the calculation part of the
program in a CASE INTUITICKS: loop, it runs 10% faster than if I just
let it run (and not be multi-tasking happy!) Weird....
Now the problem is, if I use the INTUITICKS trap, the WINDOW ALWAYS HAS
TO BE SELECTED!! If the window isn't selected it just hangs at the spot
until I re-activate it. Whats going on? Is there a way around it?
Phil Dietz
---
University of Nebraska Phil Dietz //
Computer Science 252u3130@fergvax.unl.edu \\// out the
\/ Amiga!
Re: INTUITICKS Problem!
Author: Joe Porkka
Date: Tue, 18 Dec 1990 06:38
Date: Tue, 18 Dec 1990 06:38
18 lines
1447 bytes
1447 bytes
252u3130@fergvax.unl.edu (Phil Dietz) writes: >I'm writing a program that does a BUNCH of calulations (3d ray trace >stuff). Well as it turns out, if I put the calculation part of the >program in a CASE INTUITICKS: loop, it runs 10% faster than if I just >let it run (and not be multi-tasking happy!) Weird.... Hmm, not sure. Care to give more details? How do you decide how much calculation per intuitick? how were you doing it without intuiticks? > >Now the problem is, if I use the INTUITICKS trap, the WINDOW ALWAYS HAS >TO BE SELECTED!! If the window isn't selected it just hangs at the spot >until I re-activate it. Whats going on? Is there a way around it? INTUITICKS only happen in the active window. You can get input.device ticks, which are the ultimate source on intuiticks, by adding yourself as an input hanlder. NOTE: do as little as possible in an input-handler, else you can mess things up by slowing things down.
Re: INTUITICKS Problem!
Author: Peter Cherna
Date: Tue, 18 Dec 1990 16:14
Date: Tue, 18 Dec 1990 16:14
33 lines
2162 bytes
2162 bytes
In article <1990Dec17.220906.15730@hoss.unl.edu> 252u3130@fergvax.unl.edu (Phil Dietz) writes:
>I'm writing a program that does a BUNCH of calulations (3d ray trace
>stuff). Well as it turns out, if I put the calculation part of the
>program in a CASE INTUITICKS: loop, it runs 10% faster than if I just
>let it run (and not be multi-tasking happy!) Weird....
The system will take care of multitasking. You don't have to voluntarily
give up the processor in order to be multitasking-friendly. The Amiga
is a pre-emptive system, which means that after the right amount of time,
your task will be pre-empted if someone else is ready to run.
The key principle of being multi-tasking friendly is not to avoid being
busy, but to avoid being busy doing nothing. So, if your program has
work to do, do the work, but if you're waiting for some event (eg.
a signal or a message), then use the Wait() or WaitPort() command, instead
of running in a tight loop checking the condition.
>Now the problem is, if I use the INTUITICKS trap, the WINDOW ALWAYS HAS
>TO BE SELECTED!! If the window isn't selected it just hangs at the spot
>until I re-activate it. Whats going on? Is there a way around it?
INTUITICKS are only sent to the active window. You can set up requests
with the timer.device that you'll hear all the time. But as explained
above, you don't need this (at least not for the use you describe).
>Phil Dietz
Peter
--
Peter Cherna, Software Engineer, Commodore-Amiga, Inc.
{uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com
My opinions do not necessarily represent the opinions of my employer.
"Oh, PIN-compatible! I thought you wanted me to make it IN-compatible!"
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads