* I take it back.
I guess: TPT might have a varible, like max_ID. When a particle disappears TPT would change max_ID and decrease it. TPT always increases max_ID (maybe because some developers fix bugs in this way, and didn't expect the result), and so the simulator has to check particle ID = 0...max_ID, causing lag.
I will look at source code.
EDIT: I didn't guess wrongly! Simulation.cpp(3528)
//the main particle loop function, goes over all particles.
for (i=0; i<=parts_lastActiveIndex; i++)
if (parts[i].type)
{
t = parts[i].type;x = (int)(parts[i].x+0.5f);
y = (int)(parts[i].y+0.5f);
There must be something wrong here.
Now, am I blind?
Yes I just read the load code and TPT actually don't lag anymore when a save is loaded. parts_lastActiveIndex is reset to a minimum value. Also lag stops when clear simulation, parts_lastActiveIndex is reset.
I know no developers intend to get it constantly increased, but most developers fix bugs by getting it increased and forget to decrease it.
I guess it is wrong, for example, maxmium particle ID is 100, but I guess it might be 10000 or more and cause lag. Did you debug it?
elementCount[tempPart.type]++: No, it's not the point I want to say.
This happens to me all the time also. If I leave it idle for awhile, it will drop to 10-20fps. Either closing/reopening the save, or closing and reopening PT will fix it.
GTX 780
i5 3570k (4.4ghz)
8GB RAM
So there's definitely no hardware limitations here. I make a lot of electronics, so maybe it's one of those particles. However I think it has happened on an empty screen too. It doesn't seem to happen if you save is actually doing something. For example, I left my processor (pt processor, not my real processor) running a program for 2 hours, and the FPS never suddenly dipped. Did that several times and it was fine. However if I left the save on idle for 20+ minutes, the frame rate would dip.
It must be because your memory uses BRAY and disappeared very often.
I mean, the memory uses BRAY and prevents TPT from lagging.
I think I should debug TPT at once.