Opened 12 years ago
Closed 12 years ago
#1580 closed Enhancement (invalid)
Very small buffer for hash calculation
Reported by: | jusid | Owned by: | charles |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | libtransmission | Version: | 1.40 |
Severity: | Normal | Keywords: | |
Cc: | colrol@… |
Description
I noticed that recalculateHash() function uses very small 8Kb input buffer. It is real speed killer on embedded devices with slow CPU like routers and NMTs.
Changing this buffer size to 64Kb produces 1.5x download speed boost on my NMT.
Change History (8)
comment:1 Changed 12 years ago by charles
- Milestone changed from None Set to 1.41
- Status changed from new to assigned
comment:2 Changed 12 years ago by charles
comment:3 Changed 12 years ago by charles
- Resolution set to fixed
- Status changed from assigned to closed
Added to 1.4x in r7339
comment:4 Changed 12 years ago by jusid
- Resolution fixed deleted
- Status changed from closed to reopened
Charles, actually larger buffer helps reduce CPU usage on embedded devices by reducing the number of I/O calls to operating system.
In your changes you set only 16Kb for embedded devices and 64Kb for other systems. 64Kb buffer should be used for all systems.
comment:5 Changed 12 years ago by charles
- Resolution set to fixed
- Status changed from reopened to closed
comment:6 Changed 12 years ago by jusid
- Resolution fixed deleted
- Status changed from closed to reopened
Charles, you changed buffer type from stack based to static. But recalculateHash() function is called from multiple threads! The results will be catastrophic if file verification will be performed by its thread and there will be active downloads.
comment:7 Changed 12 years ago by Rolcol
- Cc colrol@… added
comment:8 Changed 12 years ago by charles
- Milestone 1.41 deleted
- Resolution set to invalid
- Status changed from reopened to closed
Added to trunk in r7338