dtolnay/cargo-tally

Reduce memory usage

开放

#76 创建于 2023年8月8日

 (2 条评论) (0 个反应) (0 位负责人)Rust (11 个派生)github user discovery
help wanted

仓库指标

星标
 (255 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Memory usage of cargo tally can get quite severe. Running cargo tally winapi windows-sys peaked at 12.7 GB, which isn't terrible (but also far from great). However, when trying it with --transitive, the program exhausts my 32 GB of RAM and 8 GB of swap before Linux kills it as OOM, so it apparently uses in excess of 40 GB.

Is it somehow possible to reduce the amount of memory used? I don't mind if it takes longer to run; the speed is reasonable as-is. Perhaps if some data could be written to disk (and later read back as needed) if memory usage exceeds a threshold?

贡献者指南