Skip to content

Consider hashing nodes in AstIdMap for more stable IDs #19821

Closed
@Veykril

Description

@Veykril
Member

Right now we user a bread-first/depth-first hybrid tree walk to sequentially assign IDs to nodes. This is super unstable, adding a single node having the potential to invalidate the majority of IDs in the map. Something the rustc folks are considering is hashing (a subset) of a given node and using that hash as the ID instead for their IDs. This produces a lot more stable IDs, we should consider this!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-perfperformance issuesC-enhancementCategory: enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @davidbarsky@Veykril

      Issue actions

        Consider hashing nodes in AstIdMap for more stable IDs · Issue #19821 · rust-lang/rust-analyzer