eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

Sleep less

Open michaelortmann opened this issue 1 year ago • 3 comments

Found by: michaelortmann Patch by: michaelortmann Fixes:

One-line summary: Sleep less - improve responsiveness user experience

Additional description (if needed): Lower amount of time we sleep() in some exit/quit situations. I would favor to remove all such sleeps ;) But because of historical reasons, lets just lower the amount here. I checked ircii, irssi and weechat and there is no single sleep in them longer than 2 secs. mirc removed any sleep a long time ago: https://forums.mirc.com/ubbthreads.php/topics/251851/exit-and-quit-message Also i argue: why do we sleep in some situations, when in others we dont need to, like .jump does not sleep:

.jump 127.0.0.1
18:04:33.309994 write(8, "QUIT :changing servers\n", 23) = 23
18:04:33.310534 close(8)                = 0

Test cases demonstrating functionality (if applicable): 2 sleeps were modified, so i checked both situations:

  1. /msg <bot> die <passwd>
  2. kill <pid_of_bot>

michaelortmann avatar Feb 12 '25 17:02 michaelortmann

The code is fine, the principle of the thing is up to @vanosg

thommey avatar Nov 30 '25 14:11 thommey

Let's drop the 3 second to 1 second to match the msg command and not adjust the msg command 1s to .5s.

vanosg avatar Nov 30 '25 16:11 vanosg

done. ready for review again.

michaelortmann avatar Dec 01 '25 07:12 michaelortmann