I just had try made a huge "fridge" (screen). On start it was ok, but when temp get cool enough that CO2 starts to insta change to solid state from gas, and pressure of CO2 is generally low at that point performance drop is like crazy. I get literally 0.5 FPS.
So it was changing 0.5g parts from gas to solid state of CO2. Amount of that changes per sec was really high.
I checked CPU 30% load, ram in total 6G used from 16G available. (But imho it was pure CPU issue).
So it looks like your termo lib or something related to changing state in high throughput per sec and low amounts is has huge bottleneck. You should investigate that deeplay as it kill general prefrormance.
Weird with that is also that it was "losing" frames but game looks like keep normal processing time, only FPS was 0.5 per second. So back then actually game looks like slide show ;).
As soon I stop my "fridge" and temp rise above inst change gas to solid everything with FPS back to normal.
I didn't try to recreate but i happens simillar in prev world i had. So to recrated:
Isolate room with multiple CO2 incoming gas pipe. Cool it down and let it start change state in small pieces.
--I try search for similar report but didn't find, hope it's not duplicated.