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

Move graph cycle detection to rust. (cherrypick of #11202) #11203

Merged
merged 1 commit into from Nov 19, 2020

Conversation

stuhood
Copy link
Sponsor Member

@stuhood stuhood commented Nov 19, 2020

Problem

Our existing cycle detection (and reporting) algorithm is implemented recursively in Python, and can hit recursion depth limits for larger graphs.

Solution

Rather than porting to an iterative algorithm (which is complex when you need to actually report the cycle path), or adjusting recursion limits (which would work fine, but which exist as a reminder that stack frames are not cheap in Python), port our existing algorithm to Rust.

Fixes #11201.

[ci skip-build-wheels]

Our existing cycle detection (and reporting) algorithm is implemented recursively in Python, and can hit recursion depth limits for larger graphs.

Rather than porting to an iterative algorithm (which is complex when you need to actually report the cycle path), or adjusting recursion limits (which would work fine, but which exist as a reminder that stack frames are not cheap in Python), port our existing algorithm to Rust.

Fixes pantsbuild#11201.

[ci skip-build-wheels]
@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 2f28cee on stuhood:stuhood/2.0.x-pick-11202 into 68348c6 on pantsbuild:2.0.x.

@stuhood stuhood merged commit cf2d604 into pantsbuild:2.0.x Nov 19, 2020
@stuhood stuhood deleted the stuhood/2.0.x-pick-11202 branch November 19, 2020 01:09
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.

None yet

3 participants