mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Improve the RoaringBitmap codec to reserve enough vector space
This commit is contained in:
parent
3fe497e129
commit
816db7a0aa
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ impl heed::BytesEncode<'_> for RoaringBitmapCodec {
|
|||
type EItem = RoaringBitmap;
|
||||
|
||||
fn bytes_encode(item: &Self::EItem) -> Option<Cow<[u8]>> {
|
||||
let mut bytes = Vec::new();
|
||||
let mut bytes = Vec::with_capacity(item.serialized_size());
|
||||
item.serialize_into(&mut bytes).ok()?;
|
||||
Some(Cow::Owned(bytes))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue