Skip to content

Conversation

@wmathurin
Copy link
Contributor

The test no longer creates large strings (neither before writing nor after reading).

That is however insufficient to avoid the OOM since the underlying implementation read all the bytes in memory for encryption/decryption. So I lowered the size of the test data.

NB: I did attempt to implement a memory-efficient kv-store using CipherOutputStream and CipherInputStream (see wmathurin@047def6)

  • it was noticeably slower
  • it also caused OOMs ! Maybe Android's Conscrypt AES-GCM cipher implementation has internal buffering !! ??

The test no longer creates large strings (neither before writing nor after reading).

That is however insufficient to avoid the OOM since the underlying implementation read all the bytes in memory for encryption/decryption.
So I lowered the size of the test data.

NB: I did attempt to implement a memory-efficient kv-store using CipherOutputStream and CipherInputStream (see 047def6)
- it was noticeably slower
- it also caused OOMs ! Maybe Android's Conscrypt AES-GCM cipher implementation has internal buffering !! ??
@wmathurin
Copy link
Contributor Author

NB: The one failure is a flapper in a different lib.

@wmathurin wmathurin merged commit b89ee3e into forcedotcom:dev Sep 12, 2025
31 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants