lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Re: LYNX-DEV lynx_w32.zip feedback


From: T.E.Dickey
Subject: Re: lynx-dev Re: LYNX-DEV lynx_w32.zip feedback
Date: Wed, 15 Apr 1998 09:34:12 -0400 (EDT)

> 
> On Wed, 15 Apr 1998, T.E.Dickey wrote: 
>  
> > I think we should replace all of the 
> >     if(TRACE)fprintf(stderr,....) 
> > with a call that hides the function pointer, and #define'd to allow 
> > removing 
> > it entirely: 
> >  
> > #define DPRINTF(p) dprintf p; 
> >  
> > (yes, I'm aware that it would run about 1% slower if we pass all of that 
> > stuff on the stack - but it would be much simpler to maintain). 
>  
> It would only be slower when you are tracing, right?  And tracing is 
> already slow IMHO. 
yes/no: it would be slower because passing the parameters is extra work,
and also because sometimes it would be evaluating expressions to do that.
We could work around that by making the macro have the if statement
the way it does now:
        #define DPRINTF(p) if (TRACE) dprintf p

otoh, I think that part of why tracing is slow is that I think there's some
sleep's buried away to make the error messages visible (maybe that's not
right).  But even if that's not right, stderr is normally not buffered,
so that _is_ slow.

On Win32, it would always be slow, I'm afraid: M$ doesn't afaik guarantee
that a file's written out completely unless you close it, so if we were
to make it reliable as well, we'd probably do what I've seen in other places
(close & reopen the file after each message).

-- 
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]