Skip to content

fix: parallelize bitmap partition loading in IsIn expressions#5355

Merged
Xuanwo merged 3 commits intolance-format:mainfrom
wkalt:task/parallelize-bitmap-partition-loading
Dec 1, 2025
Merged

fix: parallelize bitmap partition loading in IsIn expressions#5355
Xuanwo merged 3 commits intolance-format:mainfrom
wkalt:task/parallelize-bitmap-partition-loading

Conversation

@wkalt
Copy link
Copy Markdown
Contributor

@wkalt wkalt commented Nov 27, 2025

Prior to this commit an IsIn query on a bitmap index would load partitions in serial order. On high latency connections, queries with large IsIn lists can get very slow. This commit changes the partition loading to be parallelized over the number of CPUs, similar to btree.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@github-actions github-actions Bot added the bug Something isn't working label Nov 27, 2025
Prior to this commit an IsIn query on a bitmap index would load
partitions in serial order. On high latency connections, queries with
large IsIn lists can get very slow. This commit changes the partition
loading to be parallelized over the number of CPUs, similar to btree.
@wkalt wkalt force-pushed the task/parallelize-bitmap-partition-loading branch from 58c8137 to d88f117 Compare November 27, 2025 01:59
@wkalt
Copy link
Copy Markdown
Contributor Author

wkalt commented Nov 27, 2025

Here is some performance data
benchmark_plot

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-index/src/scalar/bitmap.rs 83.33% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@BubbleCal BubbleCal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Comment thread rust/lance-index/src/scalar/bitmap.rs Outdated
let this = self.clone();
async move { this.load_bitmap(&key, None).await }
}))
.buffered(get_num_compute_intensive_cpus())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like we don't care the order, buffered_unordered may offer better performance

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, updated.

@Xuanwo Xuanwo merged commit 82df343 into lance-format:main Dec 1, 2025
25 of 26 checks passed
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
…format#5355)

Prior to this commit an IsIn query on a bitmap index would load
partitions in serial order. On high latency connections, queries with
large IsIn lists can get very slow. This commit changes the partition
loading to be parallelized over the number of CPUs, similar to btree.
wkalt added a commit to wkalt/lance that referenced this pull request Jan 26, 2026
…format#5355)

Prior to this commit an IsIn query on a bitmap index would load
partitions in serial order. On high latency connections, queries with
large IsIn lists can get very slow. This commit changes the partition
loading to be parallelized over the number of CPUs, similar to btree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants