apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Knight <Christopher.D.Kni...@nasa.gov>
Subject Re: apr_file_printf - fixed-length buffer and %s
Date Fri, 26 Mar 2004 00:24:12 GMT
Chris Knight wrote:

> 2) It seems to me that, with a rewrite, the buffer should only be
> necessary for formatting numerical expansions (i.e. %03.2d) and that the
> format string and "%s" expansions could be written directly to the file
> and bypass a buffer. This should improve performance and ensure that the
> buffer size limit is not an issue. (And a smaller buffer should be
> acceptable?) I would be willing to take this re-write on, if I get the
> blessing of the apr developers...

In fact, this is a very easy thing to re-write, using the apr_vformatter 
code, a fixed-size buffer (moderately-sized) and the flush would simply 
write the buffer to the file. Any interest in my providing the patch?

View raw message