Skip to content

Graph assembly scans every AST file for every semantic file mention #5671

Backlog

Description

@sdivyanshu90

Graph assembly spends quadratic time folding semantic file mentions into AST file nodes. It scans the entire AST file list for each semantic mention, even when every filename is distinct. The saved-graph loss check repeats the same search.

Reproduction

With Graphify 0.9.124 and Python 3.14 on Linux, call build_from_json with 8,000 AST file nodes named f0.py through f7999.py, plus 8,000 semantic nodes with the same labels and a document source path. A minimal fixture has no edges. The build took 11.4 seconds.

Index basename and path-suffix labels once and use that index for the build and shrink check. Preserve the rule that an ambiguous or independently evidenced mention stays separate.

Activity

  1. github-actions commented on Dec 1, 2026

    @github-actions

    Thanks for opening this issue, @sdivyanshu90. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions