Implement cache layer for file storage
- 主要语言
- Go
- 星标
- 6.1k
- 派生
- 690
- 平均合并
- 3 天 10 小时
- 30 天内合并 PR
- 12
描述
This was mentioned in #234.
Disk operations are not so great on Windows/Android systems.
So we can add a disk cache from our side to collect write operations and flush them once buffer if filled up or periodically.
This one is implemented in libtorrent. Some interesting points there: https://github.com/arvidn/libtorrent/blob/master/src/disk_io_thread.cpp#L874 and https://github.com/arvidn/libtorrent/blob/master/src/disk_io_thread.cpp#L1679 .
Not sure we need that level of complexity.
I was looking at golang's bufio implementation (https://golang.org/src/bufio/bufio.go?s=14456:14486#L599) which is pretty simple. We just miss offset writes, and, probably, need to collect multiple consequent chunks into one bigger write operation.
Probably have to manage flushing if need to verify the piece or something.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。