node-stl
node-stl copied to clipboard
Performance issues - Could isWatertight be optional?
Hi! Thank you for this library; it's been very useful for my project.
I'm writing this post because I'm experiencing performance issues with it. I'm working with a 3D model that has 600,000+ faces, and it takes about 8.5 seconds to process the file on my computer. When I run it on my server, which is much less powerful, it freezes.
I've conducted some tests, and I've found that the "_isWatertight" function takes a lot of time to respond. If I remove that call, the processing time decreases from 8.5 to 3.6 seconds.
In my opinion, that function seems very specific, but the library forces us to use it.
Wouldn't it be better if the library only calculated the values that are requested instead of calculating everything from the constructor?
Would you accept a PR to change this?
Hi @rafaelgc happy to hear the library helps with your project! Sure, sounds like a good patch. Would be great to improve the lib!