mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Optimize memory allocation of the apat algorithms
Former-commit-id: 5010c5a666b322715b3b81c1078d325e1f647ede
This commit is contained in:
@ -46,7 +46,7 @@ func ISequenceChunk(iterator obiiter.IBioSequence,
|
||||
for data.Next() {
|
||||
b := data.Get()
|
||||
*chunk = append(*chunk, b.Slice()...)
|
||||
b.Recycle()
|
||||
b.Recycle(false)
|
||||
}
|
||||
|
||||
jobDone.Done()
|
||||
|
@ -106,7 +106,7 @@ func ISequenceSubChunk(iterator obiiter.IBioSequence,
|
||||
batch.Slice()[i] = nil
|
||||
}
|
||||
|
||||
batch.Recycle()
|
||||
batch.Recycle(false)
|
||||
|
||||
_By(func(p1, p2 *sSS) bool {
|
||||
return p1.code < p2.code
|
||||
|
@ -97,8 +97,7 @@ func IUniqueSequence(iterator obiiter.IBioSequence,
|
||||
// No more sub classification of sequence or only a single sequence
|
||||
if opts.NoSingleton() && len(batch.Slice()) == 1 && batch.Slice()[0].Count() == 1 {
|
||||
// We remove singleton from output
|
||||
batch.Slice()[0].Recycle()
|
||||
batch.Recycle()
|
||||
batch.Recycle(true)
|
||||
} else {
|
||||
iUnique.Push(batch.Reorder(nextOrder()))
|
||||
}
|
||||
|
Reference in New Issue
Block a user