Skretzo / shortest-path

Pathfinding for Old School RuneScape
BSD 2-Clause "Simplified" License
14 stars 27 forks source link

Utility Features & Stability Fixes #46

Closed jocopa3 closed 1 year ago

jocopa3 commented 1 year ago

Stress tested plugin stability by spam-clicking options on/off and turning the plugin itself on/off quickly. After a fixing a few breaks/exceptions, the plugin seems to be fully stable.

Debug Panel

Edit: Removed memory usage display, see comment below.

image
Old Screenshotimage

Additional Changes

jocopa3 commented 1 year ago

Removed the memory usage debug display. It's not a measure of how much memory shortest-path uses, but rather a rough measure of how much memory was allocated across the entire game while pathfinding was running (assuming no GC took place in that time). Because of this it's a gross over-estimation of memory usage and not a relevant metric. I wouldn't want users being misled into thinking shortest-path is eating up memory because some other plugin in the background is leaking a ton of memory.

New panel looks like:

image
Skretzo commented 1 year ago

What do you think of only showing the debug panel if the --debug argument has been passed to the client?

jocopa3 commented 1 year ago

What do you think of only showing the debug panel if the --debug argument has been passed to the client?

If it's something you'd prefer I can change it to toggle only during development/debugging. Included it as an option in-case there's info that'd be helpful in narrowing down bug reports and issues but it's also not too useful to most people outside of being interesting stats to look at.

Skretzo commented 1 year ago

For simplicity for developers I think you should leave it as a config option like you intended.

I just remembered issue #26 where someone accidentally turned on Draw transports and did not know how to remove it again.

jocopa3 commented 1 year ago

Opted to move the panel toggle to a "Debug Options" section to make it clearer to people that it's probably not something they need to toggle. Hopefully that along with the panel title being "Shortest Path Debug" make it obvious what it is and how to turn it off if needed.