Is it possible to overwrite an InstancedBufferAttribute without creating a new geometry?

Is there any way to overwrite an attribute without creating a new geometry? Yes, I realize that the preferred way is to just create a “large enough” attribute buffer and rather update the contents of the attribute, but this is not desirable in my case as the number of instances differs during runtime. The number of instances could in my case be very large and I don’t want the cases with low amount of instances to require so much data to be uploaded to the GPU. Preferable I would just overwrite the existing attribute with a new one. This is of course possible by just re-creating the entire BufferGeometry from scratch, but I don’t want to upload all the geometry again if I don’t have to.

see How costly is allocating new BufferAttribute array? - #5 by Mugen87

Do you have to render everything in one draw call? Why don’t you make 10 smaller equally sized buffers? Or increase the size exponentially?

Thanks for the help, yeah I’ll go for a dynamic exponential growth when recreating the buffer. Going to be a bit messy trying to manage the instances (as not all of them will always render), but should do the job. Guess I’ll have to shuffle around the data in the attributes.