Skip to content

Conversation

@karthikbhat13
Copy link
Contributor

Fixes: #5770

Initializing LockFreeBitArray with bit array would clone (while creating AtomicLongarray) the array passed in the background doubling the memory consumed. Previous logic also used a local variable that was holding the data that would be cloned again later.

Fix - Initialize the LockFreeBitArray with length initially and populate the array with bits directly from the dataStream.

@google-cla google-cla bot added the cla: yes label Dec 1, 2021
@cpovirk cpovirk added P2 package=hash type=enhancement Make an existing feature better labels Dec 13, 2021
copybara-service bot pushed a commit that referenced this pull request Jan 11, 2022
…ng `BloomFilter`.

Closes #5799.
Fixes #5770.

RELNOTES=n/a
PiperOrigin-RevId: 414744518
copybara-service bot pushed a commit that referenced this pull request Jan 13, 2022
…ng `BloomFilter`.

Second try, setting the `bitCount` property correctly.

Closes #5799.
Fixes #5770.

RELNOTES=n/a
PiperOrigin-RevId: 421301343
copybara-service bot pushed a commit that referenced this pull request Jan 13, 2022
…ng `BloomFilter`.

Second try, setting the `bitCount` property correctly.

Closes #5799.
Fixes #5770.

RELNOTES=n/a
PiperOrigin-RevId: 421580967
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Halve memory used by BloomFilter.java : readFrom()

3 participants