SDFIdk / DHMQC

Processing suite for the Danish Digital Elevation Model
Other
6 stars 2 forks source link

Delaunay triangulation makes excessive copies of data #26

Open plimkilde opened 5 years ago

plimkilde commented 5 years ago

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.

plimkilde commented 5 years ago

As delaunator-cpp builds a C++ vector<size_t> for the indices, we are currently forced to duplicate the data as C ints 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.