mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
Revert "LibIPC: Use a zero-delay timer for message processing"
This reverts commit 3bed7d5a5e
.
As discovered by tomuta, this caused a large increase in WindowServer
CPU usage.
This commit is contained in:
parent
60a245b065
commit
99a33c9a67
2 changed files with 3 additions and 4 deletions
|
@ -17,7 +17,6 @@ ConnectionBase::ConnectionBase(IPC::Stub& local_stub, NonnullRefPtr<Core::LocalS
|
||||||
, m_local_endpoint_magic(local_endpoint_magic)
|
, m_local_endpoint_magic(local_endpoint_magic)
|
||||||
{
|
{
|
||||||
m_responsiveness_timer = Core::Timer::create_single_shot(3000, [this] { may_have_become_unresponsive(); });
|
m_responsiveness_timer = Core::Timer::create_single_shot(3000, [this] { may_have_become_unresponsive(); });
|
||||||
m_processing_timer = Core::Timer::create_single_shot(0, [this] { handle_messages(); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnectionBase::~ConnectionBase()
|
ConnectionBase::~ConnectionBase()
|
||||||
|
@ -176,8 +175,9 @@ bool ConnectionBase::drain_messages_from_peer()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_unprocessed_messages.is_empty()) {
|
if (!m_unprocessed_messages.is_empty()) {
|
||||||
if (!m_processing_timer->is_active())
|
deferred_invoke([this] {
|
||||||
m_processing_timer->start();
|
handle_messages();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,6 @@ protected:
|
||||||
|
|
||||||
NonnullRefPtr<Core::LocalSocket> m_socket;
|
NonnullRefPtr<Core::LocalSocket> m_socket;
|
||||||
RefPtr<Core::Timer> m_responsiveness_timer;
|
RefPtr<Core::Timer> m_responsiveness_timer;
|
||||||
RefPtr<Core::Timer> m_processing_timer;
|
|
||||||
|
|
||||||
RefPtr<Core::Notifier> m_notifier;
|
RefPtr<Core::Notifier> m_notifier;
|
||||||
NonnullOwnPtrVector<Message> m_unprocessed_messages;
|
NonnullOwnPtrVector<Message> m_unprocessed_messages;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue