[UI] Compiler messages

Bill Schwab BSchwab at anest.ufl.edu
Wed Nov 14 14:25:53 UTC 2007


Tim,

That's not the "dimension" I had in mind: I was referring to the use of
default actions.  Unfortunately, giving teeth to EndOfStream appears not
to be as simple as changing the default action.

In the affected application (parsing medical data streams), I already
have to protect against exceptions from other sources, so the speed hit
for creating the handler is already in place.  I would much rather have
the exception arise "honestly" from reading off the end of a mal-formed
(or mis-identfied) stream than to wait for some screwy knock-on effect
of silent truncation.  The real fear is that the truncated data _might_
appear valid.

Bill




Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254

Email: bschwab at anest.ufl.edu
Tel: (352) 846-1285
FAX: (352) 392-7029

>>> tim at rowledge.org 11/13/07 6:03 PM >>>

> [snip]
>
> This reminds me of EndOfStream.
Whoah, neddy!

This really isn't much like that at all. An EndOfStream exception  
might possibly cause a noticeable slowdown in a tight stream based  
loop, assuming that the rest of the work being done in said loop is  
trivial. Having exceptions involved in compiling is hardly the same;  
compiling is a pretty big job!

Having a 'signal exception' in your code costs nothing much,  
especially of course if it is not actually executed - the normal case.  
Actually raising the exception costs a scan of the execution stack -  
done in primitive code that is rather well written - with a check in  
Squeak code at each place where an exception handler context is found.  
If you had a really deep stack with an exception handler not relevant  
to your code at every other level (why it can't be at every level is  
left as an exercise for the student) then raising an exception would  
of course take some time.

Compile speed is rarely much of an issue and hasn't been for decades  
in ST code. Unless of course you're loading megabytes of the stuff at  
a gulp, in which case I'd politely suggest your overall process sucks.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- A room temperature IQ.





More information about the UI mailing list