PeerStata.java: Do not iterate within finishmessages()
Opened 18 months ago
Last modified 18 months ago
#2647newenhancement
PeerStata.java: Do not iterate within finishmessages()
Reported by:joggerOwned by:zzz Priority: major Milestone: undecided Component: router/transport Version: 0.9.43 Keywords:
Cc:
Parent Tickets:
Sensitive: no
Description
This looks like an important function, but those iterations do next to nothing and consume lots of CPU. The message completion code is redundant because message completion ist done by the ACK logic. Same goes for the push count check, which can never strike because we time out much earlier.
So the remaining code could be moved elsewhere or - if one was to keep the function - it would be sufficient not to iterate, but just to check the first state and possibly fail that out.