refactor: improve resource cleanup and index packing
Explicitly close file handles and remove temporary artifacts after serialization to prevent disk space leaks. Additionally, compact internal matrix structures immediately upon loading the KmerIndex to improve memory efficiency and prepare for downstream operations.
This commit is contained in:
1 parent
7a29ca6305
commit
4677d6f177
3 files changed
+11
-1
No files matched your search
@@ -112,6 +112,8 @@ impl KmerIndex {
|
||||
// Write SENTINEL_INDEXED — output is ready to use.
|
||||
fs::File::create(output.join(SENTINEL_INDEXED))?;
|
||||
|
||||
KmerIndex::open(output)
|
||||
let idx = KmerIndex::open(output)?;
|
||||
idx.pack_matrices()?;
|
||||
Ok(idx)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user