[OPEN-ILS-DEV] PATCH: osrf_json_object.c (miscellaneous)

Mike Rylander mrylander at gmail.com
Sat Dec 8 16:03:02 EST 2007


On Dec 2, 2007 11:55 PM, Scott McKellar <mck9 at swbell.net> wrote:
> This patch mainly tweaks some const-correctness, and introduces an
> optimization to reduce the use of malloc() and free().  Summary:

I've applied this, along with some instrumentation for tracking the
use of the free list.  It's very early in the testing stage, but this
was worthwhile if for no other reason than the create (or reuse) /
free (or make available) tracking.  I'm already able to spot broad
usage patterns in cstore that seem to be leaking json objects.  That's
the point at which we can again consider an upper bound on the list
size -- I've watched it climb to 50k after some requests and then just
bleed down over time.

Thanks again, Scott.  Once we kill the leaky areas (and remove or
#ifdef out the tracking or logging bits) then I think we'll see an
overall reduction in response time and overhead.  For instance, cstore
creates upwards of 2000 jsonObjects in the course of a search
response, and nearly 100,000 when paging through the call number
browser.  Reducing malloc there has /got/ to improve things.

(FWIW, that last one is where we're leaking a bit, to the tune of
around 10k objects ... my guess is that json_query is to blame.)

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list