You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So for each object that checks for equality against a PersistentConn, we do a not insignificant amount of string allocation. Address and host can be compared directly. Same for key.
Possible fix: edited
Disregard previous suggestion, this can be fixed by implementing equals differently for PersistentConn
The priority queue uses an object's equals. In our case the object can be one of three - PersistentConn, SelectionKey, Request
We can check by instanceof and dispatch to a specialized equality implementation for each case.
wdyt?
The text was updated successfully, but these errors were encountered:
We hit an edge case at work where
hogged the client's event loop and caused a server to fall over with relatively light load.
Looks like this change is related to #446
The root of the problem is in how PersistentConn implements equals, which is by:
So for each object that checks for equality against a PersistentConn, we do a not insignificant amount of string allocation. Address and host can be compared directly. Same for key.
Possible fix:
edited
Disregard previous suggestion, this can be fixed by implementing
equals
differently for PersistentConnThe priority queue uses an object's
equals
. In our case the object can be one of three - PersistentConn, SelectionKey, RequestWe can check by instanceof and dispatch to a specialized equality implementation for each case.
wdyt?
The text was updated successfully, but these errors were encountered: