Bash-09 / tf2-bot-kicker-gui

An automatic Bot Detector and kicking software for TF2
MIT License
57 stars 7 forks source link

UI is very laggy when game is not running #31

Open YoukaiCat opened 1 year ago

YoukaiCat commented 1 year ago

When tf2 is started it's working perfectly fine, but when it's not running, UI have noticeable response delay. Win 10, compiled by myself. video

Bash-09 commented 1 year ago

Are you compiling in release mode? Release mode in Rust is an insane speedup vs Debug mode. But otherwise I do admit performance has not been a primary focus for me so far but as the project gets bigger I may need to work on some optimizations.

RaymondTracer commented 1 year ago

Can confirm, it happens on the latest release. For me, windows periodically reports the window as “Not Responding”. image

Bash-09 commented 1 year ago

This is likely due to it trying to reconnect to TF2 while it's closed. I've made some changes which reduces how often this happens which should help considerably but it does still occasionally stutter when it tries to connect.

I intend to move all the IO and communication to a background thread so the UI can remain responsive at all times, but until then if you build the most recent version it should be significantly better.

Bash-09 commented 1 year ago

All this IO has been moved onto a background thread so this should hopefully not be an issue anymore for new builds. When I eventually confirm it on Windows I'll close this issue.