]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Moved the datatype lookups from the drones to the listener process.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 1 May 2010 18:11:47 +0000 (18:11 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 1 May 2010 18:11:47 +0000 (18:11 +0000)
commit64f5284570b94856aad1ed8ad83afe71cb22cd66
treefaedefa4c5a07a1cfa7b981b96b4884e12ff144c
parent2ce6d790f0c910c01127b4fd48b8b12ed3ddf686
Moved the datatype lookups from the drones to the listener process.

The cstore, rstore, and pcrud servers do dummy SELECT queries of all
the non-virtual classes in the IDL, in order to get datatypes for all
the non-virtual fields.

These lookups are time-consuming.  On my laptop they may take several
seconds.  On a system with various components running on separate
boxes, they may take longer due to the additional network latency.

Formerly these lookups were done by each drone process when it
initialized itself, resulting in an occasional hiccup of additional
response latency whenever the listener spawned another drone.

Now the parent process does the lookup once, before it spawns any
drones.  The drones inherit the resulting datatypes via the normal
fork operation, and never have to look up the datatypes themselves.

In order for this new arrangement to work, the oilsExtendIDL function
(which does the lookups) needs to receive a database connection as a
parameter, since the parent's connection is different from those of
the drones.

M    Open-ILS/include/openils/oils_sql.h
M    Open-ILS/src/c-apps/oils_pcrud.c
M    Open-ILS/src/c-apps/oils_rstore.c
M    Open-ILS/src/c-apps/oils_sql.c
M    Open-ILS/src/c-apps/oils_cstore.c

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16370 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/include/openils/oils_sql.h
Open-ILS/src/c-apps/oils_cstore.c
Open-ILS/src/c-apps/oils_pcrud.c
Open-ILS/src/c-apps/oils_rstore.c
Open-ILS/src/c-apps/oils_sql.c