That's actually happening not too infrequently lately :/ I'm not sure if there's an optimisation problem somewhere or if my computer's just slowed down a bit.
Well, there are many things layered on top of the game compared to a year before for example. A couple of checks for this and that, all the new features. It slowly piles up. It isn't noticeable for a handful of sprites, but once you've got dozens of them... I did some optimizations, especially for guards which are much easier to spawn, but overall the game wasn't designed for so many units on the screen from the start.
Also, before the official release (when leaving Early Access) I did a major revamp of every room to add in more details (rocks, debris, blood stains, etc.). These all go into the sprite array when calculating the draw order and when you have dozens of units moving around it hurts performance. But the game looks much better with all the added stuff, so I don't plan to remove it.
If it becomes an issue, you can change some of the graphics settings to improve performance: reduce the ground particle count to 2-3 and disable item hover particles completely.
The only thing that isn't really the game's fault are those random lockups. It never happens to me on Intel GPU computer, so it must be something with the graphics card (I did see it on nVIDIA). BTW, I tried to add a possible workaround for that and it's in the version 3.7.3. Did you see the lockup problem in the latest version?