Roundup Tracker

I've recently been investigating Roundup's performance so I won't be embarrased when the python.org tracker goes live. In normal use, I found the following areas that could use improvement:

backends.init -- Actually appeared in my top 20 of functions taking the most time. Keeps importing backend modules over and over. It's a piece of smart code (hey, I wrote it! ;), but maybe it's too smart for its own good.

backends.back_postgresql (probably mysql too) -- Opens four database connections for every request (admin - check whether database exists, admin - normal connection, user - check whether database exists, user - normal connection). I'm not sure how much difference making just one connection will help, but it can't hurt.

backends.rdbms_common: schema is saved using repr() -- using cPickle loads about 5 times faster. Using repr() is nicer in terms of readability and ease of debugging, but I don't think those are very important here. Consider only checking this when necessary, using the db schema disk file's timestamp. Requires that we keep the tracker open between requests...

keep tracker open between requests -- have roundup-server cache the open trackers.

That's it for the simple suggestions. On to the more radical thoughts:

Replacing our TAL implementation

From richard Wed Oct 13 10:02:34 +1000 2004 From: richard Date: Wed, 13 Oct 2004 10:02:34 +1000 Subject: backends init Message-ID: <20041013100234+1000@www.mechanicalcat.net>

It has been suggested that the backend init be changed so that the current code in there is pushed into a function determineBackends(), and then the more common *just give me a backend called Bob* operation will work much faster


CategoryDevelopment