Alright, sorry, I was thinking you were talking about merging mapblock data and pathfinding into the same set of data.
Aha! I was, sort of.. let me explain.
The mapblock data includes pointers toward data like desginations and pathfinding data. I don't think anyone has quite figured out what all the bits in the pathfinding data represent, but it seems imply things like a "flyer can go here", "a building destroyer can go here", "a magma walker can go here", etc. The traffic designations are stored in the designations data. A memory optimization would be to put the traffic designations into the pathfinding data(its just 2 bits), if would save a pointer deference and a memory read for each traversed node. I wasn't trying to say that the mapblock itself should be a node, and I apologize for not being clear (I suck at English).
If you reread the part I wrote now, it should make more sense. I was wanting to consolidate data inside the mapblock or even the mapblocks themselves, not use them as a node hehe. The gains for doing so would be pretty big and require few changes in the code compared to reworking entire systems.
If you were just talking about storing mapblock data, however, 64x64x1 z-level mapblocks can run into problems... what if you have a 2x2 embark? That's 96x96xz tiles, which means that you have to use 4 sets of 64x64, with 7168 tiles of "overlap" that contain no data per z-level.
I should have said one embark tile and not 64x64.. For some reason I was thinking 4 mapblocks per embark tile. My mistake.
Anyway, right now, the one true failure of the current A* system (which is to say, disregarding lag, and only focusing on the functions it seriously cannot perform) is that it doesn't actually support multitile creatures at all, and that it doesn't support swimming or flying creatures very well.
Multitile creatures are solved by vector meshes, they can't travel through nodes that are too narrow or not tall enough. Also consider that many times pathfinding won't be necessary at all with vectors (if the target is in the same node, the dwarf can just walk a direct path to it). Swimming and flying creatures seem to suffer from bugs more than any flaw in the system. It is really hard for hackers to debug that type of interaction without the source :/ We can do it, it just takes more time than we like to spend :/
The problem with how much lag the HFS produces is that fliers seem to actually use BFS over the entire map every time they try to pathfind, even if all access into the fortress is blocked. That means flood-filling the HFS (at least) every frame for every creature.
*** The rest of this post is addressing a worst case situation. Few forts breach HFS without the intent of fighting them off. ***
Possibly flood-filling the HFS for every dwarf in your fortress for every creature that is in HFS hehe. 200 dwarfs and other creatures in/above your fort, 20 HFS without access to your fort, and half a million tiles in your HFS? 2,000,000,000 possible node operations per frame lol.
I still defend my position that it isn't a flaw in the pathfinding code. It isn't the pathfinders fault if it is being called unnecessarily. HFS creatures shouldn't be so aggressive that they seek targets every frame, if they are that should be fixed regardless of how anything else works. A nice bandaid optimization would be the storing of z levels searched during pathfinding when looking for dwarf A, then checking if dwarf B was within those z levels before trying to path to it.
The proper fix is fixing the dataset, but maybe that isn't wise during this stage of game development idk. There are problems with the dataset that hurt more than pathfinding, and Toady is aware of that. DF didn't always have Z levels and so many features have been tacked onto a once basic system. In the average case it isn't a big deal and it is flexible enough to do anything. In the meantime there are
many other pressing issues when it comes to performance(mainly bugs) but at some point, it will be looked at. I just hope vector meshes are considered when that day comes, because tons of game developers make the mistake of not using them (even huge well funded ones) :/