← 输入框|github.com|刷新
Skip to content

generate: make GenerateAll non recursive and optimise pruning logic - #1798

Merged
phkahler merged 1 commit into
solvespace:masterfrom
phkahler:non-recursive-regenerate
Oct 27, 2026
Merged

phkahler merged 1 commit into
solvespace:masterfrom
phkahler:non-recursive-regenerate

Conversation

@phkahler

@phkahler phkahler commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

This results in a reduction of up to 50% in regeneration duration since it only prunes sequentially. Pruning should be further optimised so that it avoid traversing the full request and constraint list for every group again.

Constraints tagged for pruning are removed just before each group is solved, and the tags are cleared after solving, because the solver uses the same tags to mark the constraints it couldn't satisfy. Otherwise the constraints that failed to solve would be deleted at the end of the pass.

@ruevs This is the original 1688 PR with fixes due to the merge conflict all squashed back down to a single commit. It is 1795 squashed if you want to see the whole history there. Sorry, 1797.

This results in a reduction of up to 50% in regeneration duration since
it only prunes sequentially. Pruning should be further optimised so that
it avoid traversing the full request and constraint list for every group
again.

Constraints tagged for pruning are removed just before each group is
solved, and the tags are cleared after solving, because the solver uses
the same tags to mark the constraints it couldn't satisfy. Otherwise the
constraints that failed to solve would be deleted at the end of the pass.
@phkahler phkahler closed this Oct 27, 2026
@phkahler phkahler mentioned this pull request Oct 27, 2026
@phkahler phkahler reopened this Oct 27, 2026
@phkahler
phkahler merged commit f97e468 into solvespace:master Oct 27, 2026
8 of 12 checks passed
@ruevs

ruevs commented Nov 2, 2026

Copy link
Copy Markdown
Member

@phkahler Looks good, thanks for pointing out #1797 it helps to understand the fix. And thanks for squashing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants