armok-vision
armok-vision copied to clipboard
AV causes the Dwarf Fortress window to respond extremely slowly
Before starting AV, the Dwarf Fortress window responds immediately to keypresses (e.g. panning with arrow keys). But as soon as AV connects, Dwarf Fortress lags considerably, and now takes multiple seconds to respond to any keypress.
Is this related to the amount of communication between AV and DFHack? Does AV query the entire map every second? Is there a change API that AV could use, so it's only notified when the map geometry changes?
There's a lot of things AV reads from DF, and most of them to take a small amount of time, but it adds up.
This is something I'm currently working on fixing, by splitting up the timers on things so things can update at different rates. That way things that need to update quickly, like where people are, can, while not getting bogged down by things that are slower, like map updates.
Is there an API in RemoteFortressReader that would allow a client to receive change notifications, rather than polling the map/entity locations?
No.
Such a thing would be great, but would require two things:
- A complete re-write of RemoteFortressReader
- Somebody with much better knowledge of network programming than me.
No worries. Cutting map updates to once per second will probably relieve most of the DF window's latency.
With the new timers, does this mean the mesh is updated/regenerated only 2x per second now?
Hey @JapaMala, did you see JapaMala/VoxelFortress#2?
There's better ways to contact me than issues on other projects.