Commit Graph

7 Commits

Author SHA1 Message Date
Ludovic Marie 96290f4b94 Merge remote-tracking branch 'origin/main' into perf/rings-out-of-reach 2026-10-26 03:12:31 +01:00
Ludovic Marie 1dd47581de Ring search thread: the idle class, not behind the server
On a 4-thread laptop the background search at nice +10 took a share of the
cores from the chunk workers: 600 chunks arrived 3-4 s later. The thread now
runs only on cores nothing else wants (Linux SCHED_IDLE, macOS background
QoS, Windows idle priority): horizon_threads::idle_current.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 00:59:15 +01:00
rdbtCVS 95c336a387 fix(threads): lower helper thread priority on Android
Co-Authored-By: Codex (gpt-6.1-sol) <noreply@openai.com>
2026-10-25 20:50:57 +00:00
Ludovic Marie 41a4ce4edb Linux: the game's workers go behind its render and server threads
On Linux an unprivileged thread can't raise itself, so #1179's render
thread hint does nothing there. The dedicated server already lowered its
helper threads instead (world generation, lighting, connection writers:
10 nice levels, or the idle class). The client now does the same, so the
world-generation and meshing workers (two pools with single player's
server thread) no longer hold the render thread back while terrain loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 11:05:19 +02:00
Ludovic Marie 770809908d Render thread ahead of the workers on macOS and Windows
The client asks for its render thread what it already asks for the
server thread (vanilla's MinecraftServer.spin): user-interactive QoS on
macOS, above-normal priority on Windows, on machines with more than four
processors. While terrain loads at 32 chunks, the worker pools (two with
single player's server thread), the chunk encoders and other programs
outnumber the cores. A frame that gave its core up in queue.submit then
waited 10 to 200 ms to get one back: the long frames of #678.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:29:19 +02:00
Ludovic Marie c7f9fdd706 Dedicated server on Linux: world generation and packet writers behind the server thread
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:10:33 +02:00
Ludovic Marie 0e025df8e1 Server thread: ahead of the workers on macOS and Windows, as vanilla's spin
MinecraftServer.spin raises its server thread (Thread.setPriority(8)) when
there are more than four processors. The new horizon-threads crate makes the
same request for the dedicated server's thread and the integrated server's:
user-interactive QoS on macOS, above-normal priority on Windows, nothing on
Linux (an unprivileged thread can't raise itself).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 05:27:50 +02:00