You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getData() call copies the entire, uncompressed, vector tile buffer. This can be expensive.
We should add support for a takeData() or release() function which returns a node.Buffer which owns the underlying memory (the original mapnik.VectorTile object would then be empty).
I've decided not to move ahead with this. I was assuming that the buffer type stored on the node-mapnik object and would be easy to change into a std::unique_ptr<std::string> to allow passing ownership around. But, it turns out the underlying type of the buffer is a std::string very deep inside mapnik-vector-tile. I'm therefore reluctant to change this given the greater time expensive to modifying both libraries. So, I'm punting on this and will plan to unlock the efficiency need I have by completely avoiding node-mapnik usage over at mapbox/tilelive-vector#155
The
getData()
call copies the entire, uncompressed, vector tile buffer. This can be expensive.We should add support for a
takeData()
orrelease()
function which returns a node.Buffer which owns the underlying memory (the originalmapnik.VectorTile
object would then be empty).This will allow for much more efficient passing of data to other node C++ addons like https://github.com/mapbox/vtcomposite and https://github.com/mapbox/vtquery.
/cc @mapbox/core-tech @flippmoke
refs mapbox/node-cpp-skel#69 and mapbox/node-cpp-skel#67
The text was updated successfully, but these errors were encountered: