sonic-rs icon indicating copy to clipboard operation
sonic-rs copied to clipboard

Reusing storage allocated by from_slice

Open JosiahWhite opened this issue 11 months ago • 2 comments

I am using this library in a project that needs to deserialize many small json messages and it's working great so thanks for that.

One goal I have is to remove allocations within the critical path, but it appears this library API does not allow me to reuse the scratch space or bump allocator that is used for each parsing call to from_slice. Is this accurate or did I miss something in the documentation?

JosiahWhite avatar Jan 16 '25 20:01 JosiahWhite

could not reuse bump allocator and buffer now

liuq19 avatar Jan 17 '25 11:01 liuq19