httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mladen Turk" <>
Subject [PATCH] apr_table WAS: What to do about tables?
Date Thu, 08 Nov 2001 20:47:35 GMT

> -----Original Message-----
> From: Mladen Turk []
> Sent: 7. studeni 2001 11:23
> To:
> Subject: RE: What to do about tables?
> I'm currently working to extend the apr_table in such way
> Iterating through table elements will preserve the element index
> approach, but getting and setting elements to table will have almost
> constant times regardless of table size.

Here is the patch or should I say enhancement to apr_table.
At least I think it's an enhancement :)

I've treated the apr_table as database table, having columns and rows.
When you think of apr_table that way, you can use the same technique
that the databases use to quickly access particular row, using some sort
of indexing.

For indexing I've used the simple hashing scheme and the particular hash
bucket only references the table's ordinal number.

I've made the patch to apr_table itself, and didn't need to change the
single line of code in httpd.
That is one approach. Other would be to use the apr_htable, wich
basically encapsulates the apr_table (leaving it as is), but that would
require serious httpd recoding where applicable (well, mostly function

I'm in favor of first solution, and that is modifying apr_table.


View raw message