Changed the way pending requests are stored in an osrfAppSession.
Before, pending requests were stored in a so-called request_queue.
However it wasn't a queue at all, except in name. It was an
osrfList, i.e. an expandable pointer array used as a random
access container. Request ids were used as subscripts into the
array.
Since we don't reuse request ids (except in the theoretical case
of a wraparound), the array grew without limit. This unbounded
growth in the memory footprint could create problems for a
long-running busy process. It might have contributed to the
rumored instabililty of chopchop, our homegrown Jabber server.
Now, pending requests are stored in a hash table, where each
of 64 slots holds a doubly linked list. There should be no
effect on performance unless there are hundreds or thousands
of pending requests at once, in which case we would probably
get bogged down anyway.
M include/opensrf/osrf_app_session.h
M src/libopensrf/osrf_app_session.c
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1881
9efc2488-bf62-4759-914b-
345cdb29e865