httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: [PATCH] performance fix for mod_include
Date Sat, 10 Nov 2001 20:45:19 GMT
On Saturday 10 November 2001 10:51 am, Brian Pane wrote:
> Ryan Bloom wrote:
> [...]
> >>memset(f->ctx, 0, (size_t)((char *)&(ctx->error_str) - (char *)ctx));
> >
> >No offense, but that is an ugly line of code.  :-)  I really think that
> >error_str and time_str can just be removed from that structure.  That
> > would allow us to not add the casts, and it would speed up that function.
> >  I'll do that work sometime this week unless somebody beats me to it.
> I think a cast to size_t in that line is unnecesary (the result of
> the pointer subtraction is integral).  But I just realized that
> there's another strong reason to just remove error_str and time_str:
> the fact that the structure is over 8KB basically guarantees that
> the apr_palloc code will have to malloc a new block from the system
> free list.
> Later today I'll post a new patch that turns error_str and time_str
> into char*.

Just remove them from the structure all together.  They aren't necessary
in that structure.


Ryan Bloom
Covalent Technologies

View raw message