Delaunay triangulation makes excessive copies of data
plimkilde opened this issue · comments
The glue code in delaunator_wrapper.cpp copies both the input vertex coordinates and the resulting vertex indices of the Delaunay triangulation, the latter in order to work around manual memory management. This copying causes excessive memory usage.
As delaunator-cpp builds a C++ vector<size_t>
for the indices, we are currently forced to duplicate the data as C int
s in order to pass them around to the index-building functions etc. that expect int
arrays. I am currently working on changing those functions to accept something better than int
arrays anyway.