Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround to avoid full hang #589

Merged
merged 2 commits into from
May 30, 2024
Merged

Workaround to avoid full hang #589

merged 2 commits into from
May 30, 2024

Conversation

raphlinus
Copy link
Contributor

As the scale factor becomes unreasonably large, the number of subdivisions of an Euler spiral into lines grows, making the flatten stage take too long.

This patch just bounds the number of subdivisions, so it will eventually make progress. It will be slow, but not hang.

A better solution would be to aggressively cull so it only generates geometry inside the viewport, but that is considerably more complicated.

Workaround for #548

As the scale factor becomes unreasonably large, the number of subdivisions of an Euler spiral into lines grows, making the flatten stage take too long.

This patch just bounds the number of subdivisions, so it will eventually make progress. It will be slow, but not hang.

A better solution would be to aggressively cull so it only generates geometry inside the viewport, but that is considerably more complicated.

Workaround for #548
@waywardmonkeys
Copy link
Contributor

Given the amount of pain involved in this, I think that maybe having a comment in one of the implementations would be reasonable to explain that this particular clamp is important and a bit about why...

@xStrom xStrom added this to the Vello 0.2 release milestone May 30, 2024
Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not hanging the system is good!

@raphlinus raphlinus added this pull request to the merge queue May 30, 2024
Merged via the queue into main with commit 4cace9d May 30, 2024
16 checks passed
@raphlinus raphlinus deleted the mitigate_hang branch May 30, 2024 17:25
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