Hi all,

I am looking to improve per-request performance when you have an environment with many (thousands of) Location sections, and looking at ap_location_walk(), it looks like it is currently doing a simple linear search of locations on every request, which is far from ideal.

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. 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.

Regards,
Graham
--

Reply via email to