Skip to content

find_path blows up exponentially #17339

Open
@Veykril

Description

@Veykril

In the project that can't be shared publicly rust-analyzer started hanging up all worker threads within find_path_module / calculate_best_path. I assume that it is not actually hanging (as the recursion does look like having appropriate exit conditions everywhere) but instead running into a search tree so wide that with a max depth of 15 (

const MAX_PATH_LEN: usize = 15;
) we just run into too much work to do depending on the project setup. Lowering that to 5 seemed to somewhat fix the issue in the project somewhat confirming my assumption

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-perfperformance issuesC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions