armok-vision icon indicating copy to clipboard operation
armok-vision copied to clipboard

AV causes the Dwarf Fortress window to respond extremely slowly

Open alexchandel opened this issue 7 years ago • 7 comments

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?

alexchandel avatar Nov 04 '17 19:11 alexchandel

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.

RosaryMala avatar Nov 05 '17 07:11 RosaryMala

Is there an API in RemoteFortressReader that would allow a client to receive change notifications, rather than polling the map/entity locations?

alexchandel avatar Nov 09 '17 17:11 alexchandel

No.

Such a thing would be great, but would require two things:

  1. A complete re-write of RemoteFortressReader
  2. Somebody with much better knowledge of network programming than me.

RosaryMala avatar Nov 09 '17 17:11 RosaryMala

No worries. Cutting map updates to once per second will probably relieve most of the DF window's latency.

alexchandel avatar Nov 25 '17 08:11 alexchandel

With the new timers, does this mean the mesh is updated/regenerated only 2x per second now?

alexchandel avatar Dec 17 '17 02:12 alexchandel

Hey @JapaMala, did you see JapaMala/VoxelFortress#2?

alexchandel avatar Dec 29 '17 04:12 alexchandel

There's better ways to contact me than issues on other projects.

RosaryMala avatar Dec 29 '17 04:12 RosaryMala