Closed achirita closed 1 year ago
@platypii wouldn't this be more appropriate in V3?
wouldn't this be more appropriate in V3?
Based on the tests being unchanged, it seems like @achirita implemented this in a way which does not change the output result at all. So it is not a breaking API change.
I think anything without breaking changes should go in V2 still. Why? Because V3 is not ready yet, who knows when it will be ready. But users are actively using V2, so improvements are nice, and usage also let's us find and fix bugs sooner.
@platypii can you follow with lint changes for V2 modeling?
All Submissions:
Based on this discussion https://github.com/jscad/OpenJSCAD.org/discussions/1247 I have refactored
retessellate.js
to improve performance. This function is used by all boolean operations and is the main reason why sometimes they're really slow. To measure the performance I used a geometry with ~15k polygons which gets reduced to ~7.5k polygons. Results for current implementation ofretessellate.js
:reTesselateCoplanarPolygons
Results for new implementation:
reTesselateCoplanarPolygons
There is an ~5x overall performance improvement, but if we exclude the calls to
reTesselateCoplanarPolygons
there's more like an ~25x improvement.I haven't added this test to the existing suite because I didn't want it slowing down build times. If you consider it should be added, I can work something out.