Opened 13 years ago
Closed 13 years ago
#2607 closed Enhancement (fixed)
avoid unnecessary calls to getPeerCandidates(), wasted cycles in peerIsInUse()
Reported by: | sadface | Owned by: | charles |
---|---|---|---|
Priority: | Normal | Milestone: | 1.80 |
Component: | libtransmission | Version: | 1.76 |
Severity: | Normal | Keywords: | |
Cc: |
Description
Posted on the forums:
http://forum.transmissionbt.com/viewtopic.php?f=2&t=9039#p42196
Attachments (1)
Change History (8)
comment:1 Changed 13 years ago by charles
comment:2 Changed 13 years ago by charles
- Milestone changed from None Set to 1.80
- Status changed from new to assigned
comment:3 follow-up: ↓ 4 Changed 13 years ago by charles
I wonder if there's some way we could make peerIsInUse() cheaper? Avoiding its call seems to be the root of this patch, but we call it now in atomPulse() too in trunk.
comment:4 in reply to: ↑ 3 Changed 13 years ago by sadface
Replying to charles:
I wonder if there's some way we could make peerIsInUse() cheaper? Avoiding its call seems to be the root of this patch, but we call it now in atomPulse() too in trunk.
peerIsInUse() and qsort() are the expensive calls I tried to avoid. Oversized peer atom pool (ticket:2430) didn't help them a lot.
I wouldn't worry about atomPulse(), by default its frequency is 120 times lower than reconnectPulse()'s one.
Changed 13 years ago by sadface
comment:5 Changed 13 years ago by charles
r9611: part 1 of improvements to peerIsInUse... make it nearly free to test & see whether or not we have a peer connected to a given atom's address.
comment:6 Changed 13 years ago by charles
- Summary changed from cpu usage improvements to avoid unnecessary calls to getPeerCandidates(), wasted cycles in peerIsInUse()
comment:7 Changed 13 years ago by charles
- Resolution set to fixed
- Status changed from assigned to closed
Added to trunk for 1.80 by r9633
Hi sadface,
Could you please sync this patch with svn trunk?