design question

Tim Arnold a_jtim at bellsouth.net
Mon May 3 15:09:28 EDT 2010


This is a question about system design I guess. I have a django
website that allows users to change/view configuration details for
documentation builds. The database is very small. The reason I'm using
a database in the first place is to make it easy for users to change
the configuration of their builds. Django makes that easy and I can go
on to other problems, like actually building the documentation.

During a build, I query the configuration database at different times
to get the configuration I need, which results in several calls to the
database at different points of the build process.

It doesn't feel right that I'm making these calls at different times.
I *could* make a single big call at the beginning of the build,
basically serializing all the config data I could need into a
dictionary or maybe a json structure. And just pass that structure
around as needed during the build, with no more database calls needed.

These builds take from a few minutes to an hour or so, with the time
spent making db calls almost insignificant. So if time isn't a
problem, am I wringing my hands over something that really doesn't
matter much? I guess it just doesn't feel like the right thing to me.

thanks,
--Tim



More information about the Python-list mailing list