mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
Replace the bumpalo HashMap with a normal one
This commit is contained in:
parent
1f5d801271
commit
745bcaa23d
@ -2,6 +2,7 @@ use bumpalo::collections::CollectIn;
|
|||||||
use bumpalo::Bump;
|
use bumpalo::Bump;
|
||||||
use heed::RoTxn;
|
use heed::RoTxn;
|
||||||
use memmap2::Mmap;
|
use memmap2::Mmap;
|
||||||
|
use rayon::prelude::IndexedParallelIterator;
|
||||||
use rayon::slice::ParallelSlice;
|
use rayon::slice::ParallelSlice;
|
||||||
use serde_json::value::RawValue;
|
use serde_json::value::RawValue;
|
||||||
use IndexDocumentsMethod as Idm;
|
use IndexDocumentsMethod as Idm;
|
||||||
@ -80,8 +81,7 @@ impl<'pl> DocumentOperation<'pl> {
|
|||||||
|
|
||||||
let documents_ids = index.documents_ids(rtxn)?;
|
let documents_ids = index.documents_ids(rtxn)?;
|
||||||
let mut available_docids = AvailableIds::new(&documents_ids);
|
let mut available_docids = AvailableIds::new(&documents_ids);
|
||||||
let mut docids_version_offsets =
|
let mut docids_version_offsets = hashbrown::HashMap::<&'pl str, _, _, _>::new();
|
||||||
hashbrown::HashMap::<&'pl str, _, _, _>::new_in(&document_changes_alloc);
|
|
||||||
|
|
||||||
for operation in self.operations {
|
for operation in self.operations {
|
||||||
match operation {
|
match operation {
|
||||||
@ -213,7 +213,7 @@ impl<'pl> DocumentChanges<'pl> for DocumentOperationChanges<'pl> {
|
|||||||
fn iter(
|
fn iter(
|
||||||
&self,
|
&self,
|
||||||
chunk_size: usize,
|
chunk_size: usize,
|
||||||
) -> impl rayon::prelude::IndexedParallelIterator<Item = impl AsRef<[Self::Item]>> {
|
) -> impl IndexedParallelIterator<Item = impl AsRef<[Self::Item]>> {
|
||||||
self.docids_version_offsets.par_chunks(chunk_size)
|
self.docids_version_offsets.par_chunks(chunk_size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user