feat: dynamically compute seed expansion based on RSS
Introduce a `peak_rss_bytes()` utility for accurate per-phase RAM measurement. Replace the genome-length heuristic with a dynamic seed expansion ratio based on actual RSS delta. Explicitly drop the `GraphDeBruijn` instance before MPHF construction to prevent resource contention and ensure proper memory management.
This commit is contained in:
@@ -223,12 +223,14 @@ impl KmerPartition {
|
||||
uw.write(&unitig)
|
||||
})?;
|
||||
uw.close()?;
|
||||
let n = g.len();
|
||||
drop(g); // release GraphDeBruijn before MPHF build
|
||||
Layer::<()>::build(&new_layer_dir, block_bits, evidence).map_err(olm_to_sk)?;
|
||||
g.len()
|
||||
n
|
||||
} else {
|
||||
drop(g);
|
||||
0
|
||||
};
|
||||
drop(g);
|
||||
|
||||
let new_mphf = if any_new {
|
||||
Some(MphfOnly::open(&new_layer_dir).map_err(olm_to_sk)?)
|
||||
|
||||
Reference in New Issue
Block a user