mirror of
https://github.com/deavmi/birchwood
synced 2024-09-20 06:03:29 +02:00
Client
- Disagnosed hot-loop causing high load average (and wasting run queue time with meaningless work) - Offending functions are `sendHandlerFunc()` and `recvHandlerFunc()` and NOT eventy (as latest version doesn't do that
This commit is contained in:
parent
241f7753f5
commit
b9b2cb9c2e
@ -807,6 +807,10 @@ public class Client : Thread
|
||||
* an event depending on the type of message
|
||||
*
|
||||
* Handles PINGs along with normal messages
|
||||
*
|
||||
* TODO: Our high load average is from here
|
||||
* ... it is getting lock a lot and spinning here
|
||||
* ... we should use libsnooze to avoid this
|
||||
*/
|
||||
private void recvHandlerFunc()
|
||||
{
|
||||
@ -880,7 +884,7 @@ public class Client : Thread
|
||||
// logger.log("Ponged");
|
||||
|
||||
/* TODO: Implement */
|
||||
// TODO: Remove the Eventy push and replace with a handler call
|
||||
// TODO: Remove the Eventy push and replace with a handler call (on second thought no)
|
||||
Event pongEvent = new PongEvent(pingID);
|
||||
engine.push(pongEvent);
|
||||
}
|
||||
@ -902,7 +906,7 @@ public class Client : Thread
|
||||
/* TODO: Parse message and call correct handler */
|
||||
curMsg = Message.parseReceivedMessage(messageNormal);
|
||||
|
||||
// TODO: Remove the Eventy push and replace with a handler call
|
||||
// TODO: Remove the Eventy push and replace with a handler call (on second thought no)
|
||||
Event ircEvent = new IRCEvent(curMsg);
|
||||
engine.push(ircEvent);
|
||||
}
|
||||
@ -919,6 +923,9 @@ public class Client : Thread
|
||||
|
||||
/**
|
||||
* The send queue worker function
|
||||
*
|
||||
* TODO: Same issue as recvHandlerFunc
|
||||
* ... we should I/O wait (sleep) here
|
||||
*/
|
||||
private void sendHandlerFunc()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user