From 99a33c9a67a412fe675818a0d9c4c2b7ce4e1683 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 3 Nov 2021 19:55:59 +0100 Subject: [PATCH] Revert "LibIPC: Use a zero-delay timer for message processing" This reverts commit 3bed7d5a5ee5870de4805dd2bf47e0523e387e76. As discovered by tomuta, this caused a large increase in WindowServer CPU usage. --- Userland/Libraries/LibIPC/Connection.cpp | 6 +++--- Userland/Libraries/LibIPC/Connection.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibIPC/Connection.cpp b/Userland/Libraries/LibIPC/Connection.cpp index 7aef9aeada..5780761d24 100644 --- a/Userland/Libraries/LibIPC/Connection.cpp +++ b/Userland/Libraries/LibIPC/Connection.cpp @@ -17,7 +17,6 @@ ConnectionBase::ConnectionBase(IPC::Stub& local_stub, NonnullRefPtris_active()) - m_processing_timer->start(); + deferred_invoke([this] { + handle_messages(); + }); } return true; } diff --git a/Userland/Libraries/LibIPC/Connection.h b/Userland/Libraries/LibIPC/Connection.h index 64b29b1569..446ba9e151 100644 --- a/Userland/Libraries/LibIPC/Connection.h +++ b/Userland/Libraries/LibIPC/Connection.h @@ -60,7 +60,6 @@ protected: NonnullRefPtr m_socket; RefPtr m_responsiveness_timer; - RefPtr m_processing_timer; RefPtr m_notifier; NonnullOwnPtrVector m_unprocessed_messages;