[OPEN-ILS-DEV] PATCH: osrf_list.[ch] (miscellaneous)
Mike Rylander
mrylander at gmail.com
Sun Jan 6 21:14:43 EST 2008
On Jan 1, 2008 2:55 AM, Scott McKellar <mck9 at swbell.net> wrote:
>
> --- Mike Rylander <mrylander at gmail.com> wrote:
>
> > On Dec 30, 2007 1:14 PM, Scott McKellar <mck9 at swbell.net> wrote:
> > > These patches tidy up various things.
These are applied.
> > >
> > > 1. I moved the macros OSRF_LIST_DEFAULT_SIZE and OSRF_LIST_INC_SIZE
> > > from the header into the implementation file. No other source
> > files
> > > reference them, nor should they.
> > >
> > > 2. I moved the OSRF_LIST_MAX_SIZE macro into the implementation
> > file
> > > as well, and then commented it out. It is nowhere referenced, but
> > > out of caution I preserved it like a fly in amber.
> >
> > I'm holding back this patch, and the similar parts of the patch to
> > osrf_hash.[ch] until I can get a wee bit of feedback.
> >
> > I wonder if what we want is a build-time-knobs.h to hold build-time
> > tunable settings that we don't want to hard-code and for whatever
> > reason we may want to tweak in the future (better cache-line
> > alignment, different architectures, embedded environments, other
> > stuff
> > I'm not thinking of right now...).
> >
> > Opinions?
>
> I don't see a reason to collect tunable settings into a single
> header file. Leave them wherever they belong. If you want to be
> able to tune something at compile time, use conditional compilation:
>
> #ifndef FOO
> #define FOO 256
> #endif
>
> ...and use the -D option to specify alternative values, as desired,
> in the Makefile.
True enough.
>
> In principle this approach would enable us to use different values
> for the same tunable setting in different executables. For example
> we might want to cache up to 50 jsonObjects for most executables, but
> up to 20,000 for anything containing cstore.c. I don't know how hard
> it would be to build that kind of fine-grained control into the
> Makefiles.
>
I don't see a way to do this with shared objects, but if it came to
that we could use an int and provide a way for the using program to
set it (once, and only once) at startup.
>
> Scott McKellar
> http://home.swbell.net/mck9/ct/
>
>
--
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