Re: Lots of allocations in CipherCore

2022-01-26 Thread Sebastian Stenzel
Hi Tony, while running regression tests, I noticed that my assumption only holds true for unpadded ciphers. For padded ciphers, we still need the temporary buffer, as only the unpadded cleartext shall be written to the output buffer. That said, here is my PR. I'd be happy if you could review it

Re: Lots of allocations in CipherCore

2022-01-25 Thread Anthony Scarpino
Hi, I think it's a mistake. Looking at the old code I believe the if() for cipher.save() above that was suppose to include the new byte allocation and offset, but got missed. Feel free to fix it if you like. Let me know if you need something. Tony On 1/25/22 12:06 PM, Sebastian Stenzel wro

Lots of allocations in CipherCore

2022-01-25 Thread Sebastian Stenzel
Hi all, while playing around with JFR today, I stumbled upon a piece of code that causes a thousands of byte[] allocations. In fact it is responsible for 90% of the memory allocations in my application and causes GC to run without pause during decryption of large files. The line in question ca