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

Re: performance questions



On Fri, 2011-09-30 at 09:20 -0400, Steve Grubb wrote:
> On Thursday, September 29, 2011 11:33:09 AM LC Bruzenak wrote:
...
> 
> You might try this:
...
>  
> -	_get_exename(exename, sizeof(exename));
> +	if (exename[0] == 0)
> +		_get_exename(exename, sizeof(exename));
>  	if (tty == NULL) 
>  		tty = _get_tty(ttyname, TTY_PATH);
>  	else if (*tty == 0)

Well, we could (and then it would work like the others) but we really
want to store the exename I think. Isn't that what becomes
"exe=<EXEPATH>" in the event?

> 
> We can probably use the return value of fprintf() +1 (for the NULL byte) and 
> just keep the running total in memory.

Oh, right. That would be more precise. Good idea!

Since we're looking, what about the fstatfs in check_disk_space? Any
thoughts on that one?

Thanks Steve!
LCB

-- 
LC (Lenny) Bruzenak
lenny magitekltd com


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