httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch>
Subject Re: Optimising ap_location_walk()
Date Sat, 23 Oct 2010 17:00:10 GMT
On Saturday 23 October 2010, Graham Leggett wrote:
> Ideally, I'd like to create an index of the location sec_dir and  
> sec_url array, by creating a tree of hashtables that will allow us
> to   drill down to the relevant locations as quick as possible.

That sounds like a good idea. You need to be careful to preserve the 
order of the Location sections, however.

> This will also allow us to pre-merge many of the configurations at
> startup, instead of just at runtime (obviously because .htaccess
> is parsed at runtime we won't completely eliminate merging, but we
> will minimise it).
> If we're careful about what pools we use on startup, we can also
> free   a lot of the memory used in the initial configuration scan,
> keeping a copy of the merged config, instead of a copy of each
> location's configs.

Even if you don't worry about freeing memory, merging some of the 
configs before forking the childs may save some memory because the 
merged configs will be shared among the childs.

View raw message