Re: Best way to deal with long loops?
From: Raptor (bogus_at_none.com)
Date: 01/09/05
- Next message: Raptor: "Re: Best way to deal with long loops?"
- Previous message: Maarten Wiltink: "Re: Types"
- In reply to: Maarten Wiltink: "Re: Best way to deal with long loops?"
- Next in thread: J French: "Re: Best way to deal with long loops?"
- Reply: J French: "Re: Best way to deal with long loops?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 8 Jan 2005 16:22:01 -0800
Maarten Wiltink <maarten@kittensandcats.net> wrote in
message news:41dfe570$0$6203$e4fe514c@news.xs4all.nl...
> "Raptor" <bogus@none.com> wrote in message
> news:crnu6p0203p@news2.newsguy.com...
>
> <miniFAQ#Q11: ProcessMessages>
>
> > I recall reading that now. I was drawing a blank last
night,
> > however, and a search didn't turn up anything. I'm still
how
> > to manage the ProcessMessages or Update, as calling them
> > every iteration would be unwise, I'd think.
> >
> > One could call them every X iterations, but then the
speed
> > would depend upon the speed of the system.
>
> At 100 MHz _minimum_, who cares?
>
> If it really worries you, do some test with the slower CPU
you're
> prepared to support. Faster ones will incur more overhead,
but,
> well... they'll also be faster to begin with, and remain
so. So
> what if they might be faster still? I read news on a
Duron-1000
> desktop interactively, and also on a K6 II-300 Terminal
Server
> which is behind a 320 Kbps upstream ADSL connection. Both
are
> fast _enough_.
Users often push an application to its limits and beyond,
and "fast" is a matter of perception. If a competing product
deals with a million items in 1 second while mine takes 8,
mine will be seen as a pig.
Speed, or lack of it, is one of the complaints I have
against one program I use regularly. It's supposed to allow
one to save documents in a collection. If one has 100
relatively small documents, however, save and load times go
up to 30 seconds. If one tries to store images in those
documents--a supposed feature--well, forget it, because the
response is absurd.
The manufacturer's response: Well, don't do that--like the
old doctor-it-hurts joke.
Oddly, getting my application to perform *reasonably* well
on a 100 MHz system is one of my design criteria. I'd rather
app design manage speed and response and not depend upon
fast processors to compensate for sloppy design.
> > I'm wondering if
> > a timer set to 100 milliseconds would work well.
>
> It wouldn't work at all. You're hogging the message loop,
so
> Windows messages aren't being processed. Guess how that
timer
> tick is going to arrive?
I'm not that familiar with timers. I thought perhaps they
might utilize hardware interrupts and that the compiled code
might service interrupts even from a loop. You seem to be
suggesting otherwise. If so, good to know.
Raptor
- Next message: Raptor: "Re: Best way to deal with long loops?"
- Previous message: Maarten Wiltink: "Re: Types"
- In reply to: Maarten Wiltink: "Re: Best way to deal with long loops?"
- Next in thread: J French: "Re: Best way to deal with long loops?"
- Reply: J French: "Re: Best way to deal with long loops?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|