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

Support re-using allocated Vecs in `render` functions

Open cramertj opened this issue 7 years ago • 0 comments

Currently, render functions that include dynamically allocated types (primarily Vecs) need to re-allocate each time. It'd be nice to have some sort of pooling support. One possibility would be to have Renderer::render take some kind of AnyMap that could store "emptiable" allocated types and re-use them each time. However, this would require that the DomNode returned from render contain a reference to the entry in the AnyMap, so I don't think this is possible without a solution to #1.

cramertj avatar Jan 11 '17 22:01 cramertj