Subj : Using Prf* routines in wi
To   : Ian Moote
From : Vitus Jensen
Date : Sat Jun 24 2000 09:40 am

Moin Ian,

23.06.00 23:23, Ian Moote wrote a message to VITUS JENSEN:

VJ>> IM> What's the "1/10's rule"? TIA and TTYL.
VJ>> What's "TIA" and "TTYL"?
IM> "Thanks In Advance" and "Talk To You Later". [:)

Oh, nice to know!


VJ>> The "1/10's rule" is a rule of thumb when it comes to presentation
VJ>> manager programming.  It says that your window procedure should
VJ>> return within 0.1s to keep the user interface responsive.

VJ>> The chosen interval comes from ancient ages when a 80486DX33 was
VJ>> a fast processor (and everyone used to those speeds) so today the
VJ>> rule should be formulated a little different.  Let's try it:

VJ>> "You should not spend a considerable amount of time inside the
VJ>> window procedure.  Don't use APIs which may block (as the
VJ>> duration of the block is not predictable in a multitasking
VJ>> system), don't access files or devices (access may fail and have
VJ>> a long timeout), and don't do lengthy operations (like filling a
VJ>> large listbox)."

IM> I've seen that kind of stuff mentioned before. And this is why
IM> all of those functions should be relegated to threads? So, really
IM> when you look at it, in nearly all cases the window procedure is
IM> little more than a thread dispatcher, which is why you want to
IM> try to keep it clear. Is that about right?

I think, that's really the conclusion one should take.  If a message can be
handled in some Win* calls (or some more in WM_INITDLG when you have to setup
the dlgbox) do it from inside the window procedure.  If it's more then think
about threads.
Nevertheless, given the amount of messages which could be interesting for a
window this may give a fairly large procedure.

Bye,
   Vitus

--- Sqed/rexx 85:
* Origin: When DOS grows up it wants to be OS/2! (2:2474/424.1)