michaellukashov / Far-NetBox

SFTP/SCP/FTP/FTPS/WebDAV/S3 client for Far Manager 3 (http://farmanager.com/)
https://forum.farmanager.com/viewtopic.php?t=6317
GNU General Public License v2.0
155 stars 52 forks source link

Redundant ACTL_SYNCHRO calls every 400 ms #413

Closed alabuzhev closed 4 months ago

alabuzhev commented 4 months ago

a25911719297cd28af46400dd141d74bb98121f6 introduced TPluginIdleThread that sends ACTL_SYNCHRO events in a loop, supposedly to address #329.

There are some issues with this approach:

In other words, it constantly wakes up the main Far thread, which otherwise would've awakened only once per minute or even less frequently, and causes small, but constant and endless CPU utilization and energy consumption. Which is exactly why FE_IDLE was removed in the first place.

It's totally fine to send ACTL_SYNCHRO, but please do so only when needed, e.g. when the plugin is actually connected to some server and needs to keep the connection alive.