revert to Union for importRoaring

UnionInPlace is still heavily affected by
https://github.com/pilosa/pilosa/issues/1875 where containers that exist in an
incoming bitmap can cause massive unnecessary allocations of bitmap containers
when an array of short length is all that's needed.
This commit is contained in:
Matt Jaffee 2019-03-11 16:31:06 -05:00
parent 52d43fb4e2
commit a28141c466
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF

View file

@ -1763,11 +1763,8 @@ func (f *fragment) importRoaring(data []byte, clear bool) error {
if clear {
bm = f.storage.Difference(bm)
} else if f.storage.Containers.Size() >= bm.Containers.Size() {
f.storage.UnionInPlace(bm)
bm = f.storage
} else {
bm.UnionInPlace(f.storage)
} else if f.storage.Any() {
bm = f.storage.Union(bm)
}
for rowID := range rowSet {