Simon Wistow (deflatermouse) wrote,
Simon Wistow

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.

Tags: bot, brane, dbm, factoids, hella, horrible, lurking, mysql db, shame, sigh, sit, tendency, tests, variable names

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.