Database works, but really slowly. Only if I'm working with a database on the hard drive, though. I think that means it's accessing the disk too much, which I could avoid by batching the writes more.