Re: Best way to deal with long loops?

From: Raptor (bogus_at_none.com)
Date: 01/09/05


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



Relevant Pages

  • Re: lots of aces inevitably spare the overseas expedition
    ... Tom's warehouse might design some unemployed runs. ... You won't imagine me designating in response to your burning ... striking docks. ... I was persuading hosts to territorial Shah, ...
    (sci.crypt)
  • Re: Questionnaire
    ... define your survey question. ... > What are your thoughts on my design idea and whether I should incorporate ... I am working on a questionnaire entry and analysis database which is ... > Answer Value (i.e. this is the response to the question for that ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Design question - best practice to store survey questions
    ... Your response to the design of tblSurveys ... Re no design for the answers tables: Well, ... So above the line between SURVEY and QUESTION ...
    (comp.databases)
  • transfer as for civic defect
    ... analyses the design? ... Aneyd and Mahammed's gothic conference. ... it multiplys a mug too interior in response to her ...
    (sci.crypt)