]> git.evergreen-ils.org Git - OpenSRF.git/commit
This is a performance tweak to the osrfHashGet function, a widely
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 22 Jul 2009 03:50:13 +0000 (03:50 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 22 Jul 2009 03:50:13 +0000 (03:50 +0000)
commit41fdd72e06d517974fbb5b836aabb227d0482f96
tree9cae44e0fe19a135f895e79faad83eed4182a218
parenta2e0065f557fbdc30fdaf379de2485aadec014b5
This is a performance tweak to the osrfHashGet function, a widely
used utility function.

The old version accepted a variable number of arguments: a pointer
to an osrfHash, a string optionally containing printf-style
format specifiers, and addtional parameters as needed to fill in
the blanks.

In practice, none of the code ever uses the printf-style formatting.
We always pass exactly two parameters.  We burn CPU cycles scanning
the string for format specifiers and never find any.

I eliminated the unused variable parameters and turned osrfHashGet()
into a simple two-parameter function.  Just in case anybody ever
wants it, I also cloned the original version into a new function
named osrfHashGetFmt, which accepts a variable number of arguments
as before.

Note that, since the signature of the function is changing,
it is necessary to recompile any open-ils programs that
call it, namely:

oils_dataloader.c
oils_event.c
oils_idl-core.c
oils_cstore.c
dump_idl.c

The Makefiles apparently don't recognize this dependency.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1726 9efc2488-bf62-4759-914b-345cdb29e865
include/opensrf/osrf_hash.h
src/libopensrf/osrf_hash.c