Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve merge performance. #4131

Open
fulmicoton opened this issue Nov 14, 2023 · 1 comment
Open

Improve merge performance. #4131

fulmicoton opened this issue Nov 14, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@fulmicoton
Copy link
Contributor

Materializing the document mapping and (more importantly) doing lookups is not necessary.

        let mut merged_doc_id_map: Vec<Vec<Option<DocId>>> = self
            .readers
            .iter()
            .map(|reader| {
                let mut segment_local_map = vec![];
                segment_local_map.resize(reader.max_doc() as usize, None);
                segment_local_map
            })
            .collect();
     ...
@fulmicoton fulmicoton added the enhancement New feature or request label Nov 14, 2023
@fulmicoton
Copy link
Contributor Author

It might actually be negligible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant