connormanning / entwine

Entwine - point cloud organization for massive datasets
https://entwine.io
Other
451 stars 128 forks source link

Memory is not released when using ply #236

Closed XPYYWH closed 4 years ago

XPYYWH commented 4 years ago

I want to slice PLY data instead of LAZ point cloud data, so I apply the process of processing laz data to processing ply data, including point cloud data boundaries, number of points, coordinate information, etc. The result is no problem. But the memory occupied by data processing will not be released until the main function ends. Laz data will release the memory at the end of data processing. What is the reason?

ply

I sleep for 30 seconds before the main function ends. The memory is always occupied. When I process the laz data in the same process, it will be released before the main function ends.

laz
connormanning commented 4 years ago

I'm not sure, but Entwine simply executes a PDAL pipeline to read input data. So if the behavior of different file types for similar data is drastically different, then I'd start by looking at the specific PDAL reader invoked. In this case, it would be the PLY reader.

From a quick glance at the code there, I see that the LAS reader cleans up some resources when it is done here. The PLY reader has a similar cleanup method here, but this only cleans up the filehandle - so maybe the fact that m_elements is not cleared during done is the cause of what you're seeing.

connormanning commented 4 years ago

I've opened an issue on the PDAL repo for you @XPYYWH: pdal/pdal#3224. If it's determined that this is caused by something Entwine is doing, I'll take another look. Closing for now.

XPYYWH commented 4 years ago

OK,thanks.