| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
overlay has to be lost.
PR: 10522
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64061 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63877 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63848 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63739 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
array is pre-allocated to ensure that it's big enough to hold
the result table, just use simple pointer arithmetic to write
to successive elements, rather than calling the array push
function
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63737 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
at the end of the table weren't being properly shifted when apr_table_set/setn
removed duplicate keys (found using "testtable" in apr/test)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63735 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
recently added to tables.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63734 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
apr_table_unset
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63722 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
execution time for table lookups from O(n) to O(1).
The worst-case time remains O(n), but in httpd benchmarking
this indexing reduces the mean execution time of apr_table_get()
by 40% and apr_table_unset() by 60%.
The indexing will make it possible to speed up apr_table_vdo()
and apr_table_overlap() in the future, but I haven't changed
those yet.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63721 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
spaces, were killed today in a shootout with the Style Police. Another
small victory, making another small patch of source a little more pleasant
to spend time in.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63710 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63653 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
to functions to make apr_table_t a fully abstract type
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63650 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
check for dst_elt!=NULL on each iteration until we've seen the
first instance of the target key
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63580 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
O(n^2) in the worst case
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63575 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
in apr_table_get() for consistency
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63573 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63571 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
to apr_tables.c to strengthen its encapsulation
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63570 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63532 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
apr_table_vdo() to return int instead of void so that the caller can
know whether or not any of the iterations trigged an "early return".
However, I've left the wacky old semantics of _vdo for a while. This
solves my immediate need at least.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63531 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
consistify all broken APR_DECLARE() prototypes that were, in fact, always
handled as APR_DECLARE_NONSTD() by the MSVC compiler. Unfortunately, no
emit is raised when the compiler ignores our APR_DECLARE() semantic.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63527 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
on FreeBSD 4.6-RC.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63493 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
(somehow CVS ignored updating these on the last commit.)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63287 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
srcdir to always be available in a Makefile, so we need to stop adding
this only when we use VPATH.
Change the dependency generation to use .deps instead of appending to
the Makefile. This makes us consistent with the dependency style of
httpd-2.0.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63286 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
elements to NULL in table_push(), because this data always
gets overwritten immediately after the table_push() call.
Also eliminated the zero-fill of bytes that are immediately
overwritten in the branch of apr_array_push() that resizes
the array.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63099 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62982 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
avoid some logic in apr_table_overlap which dies with
APR_POOL_DEBUG+ElectricFence since it tries to alloc zero
bytes
it is useful to bail out early anyway to avoid some needless
function calls and other
Requesting CGI scripts through Apache causes such a call (maybe
just for HTTP/0.9? I dunno.).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62808 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a bug in apr_table_overlap: when using the
APR_OVERLAP_TABLES_SET option, the red-black tree's shape
properties were sometimes broken, which could cause a segfault
if it happened at the root node of the tree.
Obtained from: Brian Pane
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62612 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Thanks Brian!
Obtained from: Brian Pane <bpane@pacbell.net>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62611 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62554 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a cache to each element in an apr_table_t.
The cache consists of a 32-bit int containing the first 4 bytes
of the element's key, converted to uppercase.
This makes it possible to replace strcasecmp calls with inline
integer comparisons. If the integer comparison fails, we can skip
the strcasecmp. If the integer comparison succeeds, we can at
least skip the first 4 bytes of the strcmp.
In the httpd, this roughly doubles the speed of the
apr_table_get and apr_table_setn operations.
* A rewrite of apr_table_overlap() that uses a red-black tree
instead of qsort
* Cliff's faster version of the prefix computation macro
* apr_palloc instead of apr_pcalloc for creating the
array inside a table
an important note:
* This patch increases the size of the apr_table_entry_t struct,
so it requires a "make clean."
Submitted by: Brian Pane <bpane@pacbell.net>
Reviewed by: Ian Holsman, Cliff Woolley
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62547 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handling of APR_HASH_KEY_STRING.
The original logic was:
call strlen to get the length of the key;
then iterate through the key to compute the hash;
This patch combines the two into a single pass.
It also changes apr_pool_userdata_get() to take
advantage of this optimization.
Submitted by: Brian Pane <BPane@pacbell.net>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62535 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62496 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_hash_copy & apr_hash_merge.
the merge function allows for a callback if both hash's have the same value
this changes the overlay function so that it calls the 'merge'
Submitted by: Brian Pane <bpane@pacbell.net>
Reviewed by: Ian Holsman
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62493 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
half the apr_pcalloc() calls in the httpd. The calloc call
is somewhat wasteful in this context; 4 of the 5 fields in the
allocated struct get overwritten immediately. Thus the following
patch replaces the calloc with an alloc and sets the one necessary
field to NULL.
Submitted by: Brian Pane <bpane@pacbell.net>
Reviewed by: Justin Erenkrantz
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62292 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
testing these goodies ;)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62081 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
and merging operations.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62077 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62076 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Turns out the hash contents were really corrupted by a request merge,
but heck, this is still useful.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62075 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61969 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also add testhash.c program to test the proper operation of the hash
functions.
I (Justin) did the following things to Ian's patch as posted:
- Reformatted to fit APR coding style.
- Fixed comment in apr_hash.h (swapped base and overlay)
- Also reformat the test/Makefile.in while I'm at it
Submitted by: Ian Holsman <ianh@cnet.com>
Reviewed by: Justin Erenkrantz, Brian Pane <bpane@pacbell.net>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61966 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Saw this when debugging and thought it should be fixed. :)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61886 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
if we are going to bury -1 flags (I'd prefer the flag cast to apr_size_t
and use that value throughout the hash api, however.)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61649 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61375 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
finding the entry because if we do, we immediately overwrite the value.
Intead, we have to expand the hash after setting the value.
Submitted by: Jon Travis <jtravis@covalent.net>
Reviewed by: Ryan Bloom
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61356 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
("int") instead of a size type (apr_size_t).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61345 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61308 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
also cleanup s/#ifdef HAVE_FOO_H/#if APR_HAVE_FOO_H/ whrere appropriate.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61303 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61235 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61194 13f79535-47bb-0310-9956-ffa450edef68
|