Trust corefinement more (fenced under feature) for even more speedups#4101
Merged
t-paul merged 10 commits intoopenscad:masterfrom Feb 9, 2022
Merged
Trust corefinement more (fenced under feature) for even more speedups#4101t-paul merged 10 commits intoopenscad:masterfrom
t-paul merged 10 commits intoopenscad:masterfrom
Conversation
added 2 commits
February 8, 2022 03:00
…ns w/ prechecks Some benchmarks up to 3x faster.
…lhs/rhs operands Usage example: ./OpenSCAD \ tests/data/scad/3D/features/edge-cases.scad \ --enable=fast-csg --enable=fast-csg-trust-corefinement \ --enable=fast-csg-debug-corefinement \ -o out_notrust.stl ls *.off
…han without fast-csg (3 tests "fail" again)
… nef operations instead of corefinement Nudging users towards the bleeding edge
t-paul
requested changes
Feb 8, 2022
Member
t-paul
left a comment
There was a problem hiding this comment.
Code change looks good but it seems like some build files got included.
added 3 commits
February 8, 2022 18:37
t-paul
approved these changes
Feb 9, 2022
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR: Up to 3x faster
fast-csgby enablingfast-csg-trust-corefinement(might get a couple of crashes, please report with the .off files generated when--enable=fast-csg-debug-corefinementis passed in CLI).In the early days of #3637 I was optimistic for 10x to 100x improvements with corefinement operations instead of Nef polyhedron (see these old benchmarks). But the
fast-csgfeature that’s just landed in Nightly builds (#4087), only realistically bring 3x to 10x speedups. The difference is because the corefinement library can be finicky with the inputs it gets, and can throw / at times corrupt the mesh when it’s given bad inputs. I’ve added checks to avoid those error cases proactively but they're so expensive some files are just 3x slower.So… this PR adds two experimental features:
fast-csg-trust-corefinement: an override that says “yeah go ahead and use refinement without any checks, let’s see if it crashes & try to recover gracefully 🤞”fast-csg-debug-corefinement: this will create one.offfile per operand of each corefinement operation (in the working directory, which... is unclear what is is on MacOS X unless you use the CLI). If a user's model crashes and they're willing to share the generated OFFending files, we can use them to file bugs to CGAL and/or find lighter ways to prevent the bad cases from being sent to corefinement routines.