domafic-rs
domafic-rs copied to clipboard
Support re-using allocated Vecs in `render` functions
Currently, render
functions that include dynamically allocated types (primarily Vec
s) 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.