I took out the stuff that tried to put static playlists back in order that they were inserted into the database, as that was hideously expensive.
I can make it cheaper, but it means I’ll have to special-case how the library is returned versus how the playlists are returned. I really didn’t want to do that. I dunno. I might look at it more.
More importantly that that, though, is that I need to clean up the database code. Now that I know what I need in the database, it might be the case that I can speed some stuff up there.