summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorWill Whitty <tavurth@gmail.com>2022-02-01 21:53:32 +0300
committerWill Whitty <tavurth@gmail.com>2022-02-01 23:35:30 +0300
commitc37bd41c794819e0b6bc3ad4b162548057098e1c (patch)
treec06066f2703377fdc8de471196a46a5b5761d77f /core
parentea12094f19b028c1dcf6d402b8cbb3296b2065a8 (diff)
Increase RemoteDebuggerPeerTCP poll to 6.9ms
Fix high CPU usage on MacOS by reverting the polling for Network debugging to match 144hz refresh rate.
Diffstat (limited to 'core')
-rw-r--r--core/debugger/remote_debugger_peer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/debugger/remote_debugger_peer.cpp b/core/debugger/remote_debugger_peer.cpp
index a45430465f..9ec24936e7 100644
--- a/core/debugger/remote_debugger_peer.cpp
+++ b/core/debugger/remote_debugger_peer.cpp
@@ -190,7 +190,8 @@ Error RemoteDebuggerPeerTCP::connect_to_host(const String &p_host, uint16_t p_po
}
void RemoteDebuggerPeerTCP::_thread_func(void *p_ud) {
- const uint64_t min_tick = 100;
+ // Update in time for 144hz monitors
+ const uint64_t min_tick = 6900;
RemoteDebuggerPeerTCP *peer = (RemoteDebuggerPeerTCP *)p_ud;
while (peer->running && peer->is_peer_connected()) {
uint64_t ticks_usec = OS::get_singleton()->get_ticks_usec();