I tend to characterize FPS death as "the unavoidable slow death of any and all fortresses to poor optimization", since that's the way people talk about it. People doing things that are known FPS killers and being surprised when they kill FPS feels like something that should be ignored rather than lumped into that.
2. Have you found any possible ways via profiling that temperature for items can be optimized, or is a mostly hopeless "this is as good as it gets for items"?
No, I can't even find it, ha. Every in-play items needs iterated over for temperature, and it
does iterate over only items that are in-play, so I'm not sure there's much that can be improved on there.
3. Taking your own advice from the OP about profiling... Are you sure it's the pathfinding, and that the actual calculations of flow/which tiles to change aren't a significant/primary part of it?
Understandable, and the answer's "I haven't profiled hitches due to flow stuff", but the other answer is "ordinary flow through large corridors and such that aren't being pathed through by units doesn't slow down the game to the single-digits while flooding that actually crosses unit paths does", which is pretty good evidence. It's also a problem with the connectivity map (note how there's no hitch before the game says "no path" if you try to send a soldier somewhere they can't reach), having to rebuild that too often will cause problems.
4. Wouldn't optimizing pathfinding help with both the meager 6% for a normal fortress, and also the slowdowns associated with flows and stuff? Some forms of FPS death, as far as I know (I'll admit I haven't played in a long time; waiting for Premium UI changes), are "I want fancy flows and mist things, but it kills the FPS".
Yes, but making pathfinding twice as fast will still mean the game goes into the single digits during such events, and making pathfinding twice as fast isn't terribly feasible. Making it multithreaded and letting the game run while long pathfinding operations happen would make the game 100% non-deterministic, with completely different behavior on different CPUs, so that's a no-go.
1. Have you contacted Tarn about the potential optimization of caching active/uncaged/non-ghostly units yet?
I'm. Not actually sure? I've contacted him about a good deal of that sort of thing in the upcoming release, actually.
Er, most of my profiling
is from the upcoming release, I have it in advance for testing reasons. I only got the go-ahead to say that this morning and I apologize if anything I said here made it seem like I'm doing all my profiling in 0.47.05; for stuff like this, I try to keep it vague enough that I don't even
need plausible deniability, since I hate denying. Anyway, yeah, I've been pointing out anything particularly odd that I come across, since the point of testing is to make sure release goes smoothly and all. This is why I've been profiling so aggressively lately and
part of why I seem so confident in some of my assertions, a lot of my reverse engineering has been done with a back-and-forth with Tarn trying to suss out the exact thing I'm looking at.
I think the 6% value is from the upcoming version, or at least an earlier version of it (it's not final! my word is not law! et cetera!), but I'm actually not sure, since I haven't been labeling my profiles correctly (I don't even know how with vtune, lol). I don't think pathfinding has been changed at all for the upcoming version, though, so it should be still
approximately valid.
I did a 6x6 fort earlier, lasted 25 years. It succumbed to FPS death to an
extent near the end, sub-20 FPS, but I eventually figured out that this happened because I completely failed to notice a rabbitsplosion. That and the fact that there were over 100 ghosts, maybe. It was not a good fort. I was just doing it to see if there are any crashes in large embarks, since an easy "kill my game please" button is kinda a bad thing to have in a commercial release. Turns out 6x6 forts actually run about as well as 2x2, which is... really, really not the result I expected. The main difference is that getting spooked by marauding invaders causes much, much worse FPS dips, which is the whole "repathing" thing again, I think? Also, one of the main slowdowns was now something I suspect is "tile activity", plant growth etc.
The upshot of all this is, like. My numbers might be slightly too low? Display takes more time now, which lowers the %s on basically everything else by necessity, but it's threaded so it doesn't matter terribly much. This isn't new, believe it or not, 0.47.05 also has threaded display.