Commit 3e1ae5d
committed
Improve pulse sleep on busy servers (#4853)
HandlePulseSleep now returns as soon as the sync thread queues work,
instead of sleeping busy_sleep_time at the start of every pulse.
Mitigates #4853 (high player count chat lag / packet loss with low CPU):
with threadnet, the unconditional sleep could cap DoPulse while m_InResultQueue
still grew. Replaced with a short 1ms polling loop that exits on PendingWorkToDo.
Idle path unchanged (full idle_sleep_time). server_logic_fps_limit remains
the hard cap. busy_sleep_time is no longer used on this path (option still parses).
Test plan: code review only; needs 600+ player confirmation.1 parent 2239a7b commit 3e1ae5d
1 file changed
Lines changed: 11 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
556 | 557 | | |
557 | 558 | | |
558 | | - | |
| 559 | + | |
559 | 560 | | |
560 | | - | |
561 | | - | |
562 | 561 | | |
563 | 562 | | |
564 | 563 | | |
| |||
0 commit comments