site banner

The Motte is very very slow

Is it just me or lately The Motte has been getting very slow to load and occasionally timing out?

9
Jump in the discussion.

No email address required.

It's not just you. Working on it. :)

(Should be better now, I'll let it sit for half an hour or so and see how it's going. More work may be needed.)

(Edit: Sigh, not solved. Still working on it.)

(This may now be fixed; I think we were just running on bad hardware.)

It's been kinda slow for a long, long time (intermittenly most of last year?).

Not a huge deal because once it loads you usually don't have a problem but sometimes it'd take 10seconds to render etc. Or so I remember.

Some of this might actually be fixed, or at least, in a position where it can be fixed. We had a problem for a while where updating the software was impossible because it caused crashes and largescale fixes were sketchy due to how badly tested it was. Thankfully, with the rise of AI, I can (and have) just point Claude at the codebase and say "write a ton of tests kthx" and now it's a lot less questionable to do work on.

It actually found a few bugs while writing the tests which was pretty funny.

write a ton of tests kthx

How does that work? What kinds of tests does it write? How does it know what to expect or assert in the tests?

I'm paraphrasing a bit; I ended up with a bunch of prompts, including "write tests to cover every endpoint" and "write tests to increase code coverage" and "stop skipping this specific file, I've seen you consider it six times now and you keep saying it'll be hard and going to do something else, knock it off, go do it for real" and at one point it started just writing tests that verified an endpoint returned a success code instead of actually checking the data and I had to tell it to go back and fix them.

But nevertheless, it was fundamentally "go write a bunch of tests kthx".

What kinds of tests does it write?

Pretty simple ones. In general it's either "call endpoints and verify that the right thing happened in the database", or "change the database and verify that the right thing happened from the endpoint".

How does it know what to expect or assert in the tests?

By reading the code. It's not a black box, it just goes and reads the code. Then it tries stuff.

Then if the stuff didn't work, it reads the error messages and fixes it.

Same way a programmer does it, except it does it while I'm in the kitchen making a snack.