#5612 [Win] Reduce delays on resource access for main thread - #5616
Conversation
There was a problem hiding this comment.
Pull request overview
This PR increases the scheduling priority of the Windows main/render thread to reduce contention and improve responsiveness during resource access.
Changes:
- Adds helper methods on
LLWindowWin32to raise/lower the current thread priority. - Sets the main thread to high priority during
LLWindowWin32construction. - Adjusts thread priority on minimize/restore transitions before invoking activation callbacks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
indra/llwindow/llwindowwin32.h |
Declares new setThreadPriorityHigh/Normal helpers on LLWindowWin32. |
indra/llwindow/llwindowwin32.cpp |
Applies thread priority changes at startup and on window minimize/restore; implements the new helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| else | ||
| { | ||
| LL_INFOS() << "Failed to set thread priority: " << std::hex << GetLastError() << LL_ENDL; |
There was a problem hiding this comment.
The failure log for SetThreadPriority is using LL_INFOS() without the "Window" tag, while other error paths in this file use LL_WARNS("Window") (e.g., failed ReleaseDC, failed destroy). Please make this logging consistent (category/tag and severity) so failures can be filtered and noticed appropriately.
| LL_INFOS() << "Failed to set thread priority: " << std::hex << GetLastError() << LL_ENDL; | |
| LL_WARNS("Window") << "Failed to set thread priority: " << std::hex << GetLastError() << LL_ENDL; |
a789c31 to
226907a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
226907a to
5332270
Compare
Our main thread was of normal priority, despite being a render thread, so it was forced to compete for some of the resources. Give it high priority.
5332270 to
0785407
Compare
Our main thread was of normal priority, despite being a render thread, so it was forced to compete for some of the resources. Give it high priority.