I checked your complete df folder as i don't have 40.x anymore and noticed you have a lots of stockpiles.
I used to do the same, with specialized stockpiles and with the years making more of them , resulting in giant amount of surface taken by them, and performance dying, because dwarves will be very numerous and will calculate pathfinding to so many locations of those numerous stockpiles.
A huge performance improvement is to use a single quantum stockpile.
Quantum stockpiles have several advantage :
- they're very small and do not need to be any bigger with the time your fortress grow
- you need a single one of them for your whole fort, cutting a -hugely- lot on the many pathfinding calculations for your number dwarves.
- you can do them easily with a minecart stop :
http://dwarffortresswiki.org/index.php/Exploit#Quantum_stockpilesBasically it's more than an exploit, it's unfortunately a must have if you want to avoid performance going bad on long lived fort.
So my recommendation is that you create a quantum stockpile near to your workshops, then delete all the other stockpiles your have so you dwarves will move all the item into the quantum one.
As you're using dfhack, to not waste time, once you have your quantum stockpile created and ready to work, pause the game, mass-design all your stockpile objects to be dumped ( press d -> b -> d to make whole dumping selection)
Once done , move the cursor to your quantum stockpile distribution point and in dfhack type
autodump
It will teleport all those objects marked for dumping to your cursor, will remove the dump mark and will forbid them all automatically
Now press d -> b -> c and mass-unforbid that way all those objects.
That's all.
Now delete all your existing stockpile so you have only that quantum one left.
With all those deleted stockpile you have many useless empty rooms that your dwarves have nothing to do in them, so you may wall them (or create doors and keep them closed) so your dwarves will not have their pathfinding calculation taking those huge spaces in account.
Basically the less the dwarves can run around, the better.
I didn't checked, but in case you have none, i recommend you create a simple atom smasher (just need a room, covered by a raisable bridge controlled by a lever), design it as the dump zone, and get rid of all the useless items that can be found on your map (the autodump works wonder there too) , the less objects, the better too.
http://dwarffortresswiki.org/index.php/Atom_smasherThat said, i recommend you to abandon that fortress and move to 42.x , the reason is that there will be more and more bugs fixed and they could make an impact on performance too.
You could load your 40.x fortress/worlds in 42.x , but due to many raw changes you may have lots of problems happening during gameplay and may miss some of the 42.x features.
dfhack is unfortunately not yet available for 42.x , so no access to that useful autodump command, but still use quantum stockpile and atom smasher is a must to avoid the performances problems when your fort will get long lived.