?

Log in

No account? Create an account

Thu, Jun. 16th, 2005, 01:20 pm
Transferring the bot

I have a terrible tendency to nearly get projects done and then not finish with them. Last weekend I finally decided to sit down and move dipsy over to her new code base. Except the tests weren't passing because some poeople decided that refactoirng is fine as long as you don't check against the tests. *sigh*

Finally got round to fixing those up and then this morning I moved her over. And Lo! It worked. Huzzahs all round. Except that trying to get all the keys out of a DBM::Deep db is slow. Hella slow. And would cause the bot to lock up for ages. Which was bad.

So now I'm trying to transfer her brane across to a mysql DB and see if that works. I have a horrible lurking feeling that it's just a problem with the fact that dipsy's brane contains 93,957 factoids at the last count and trying to work out which keys are variable keys from that is always going to be slow. Which is a shame.

There are a couple of ideas I have to fix it if that's the case but the simplest is probably for each plugin to have a vars() method that returns a list of variable names.