httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: cvs commit: apache-apr/apr/lib apr_tables.c
Date Tue, 06 Jun 2000 17:00:49 GMT
Greg Stein wrote:

> Euh... how is this different from ap_overlap_tables() ??

Overlap tables combines the values of common headers, no information is
lost, two headers become one with comma separated data. Replace tables
does exactly that - old header values are lost and are replaced with new
header values.

It is required when replacement header data arrives from a source
webserver during a revalidation (like If-Modified-Since). The proxy is
required to replace any stored header values with new values from the
source server, discarding the old values. None of the existing table
functions can do this.

> The time-complexity of the algorithm below is also pretty expensive.
> ap_overlap_tables() takes incredible pains to bring the operation down to
> O(n log n).

To be honest I didn't pay much attention to making it fast - though it
is based on the fact that the overlayed array will almost always be very
much smaller than the original table. As a result, iterations should be
small anyway.

Is there a better way of doing this?

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."



Mime
View raw message