From c37bd41c794819e0b6bc3ad4b162548057098e1c Mon Sep 17 00:00:00 2001 From: Will Whitty Date: Tue, 1 Feb 2022 21:53:32 +0300 Subject: Increase RemoteDebuggerPeerTCP poll to 6.9ms Fix high CPU usage on MacOS by reverting the polling for Network debugging to match 144hz refresh rate. --- core/debugger/remote_debugger_peer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/debugger') 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(); -- cgit v1.2.3