Skip to content

pyright type checking is very slow #8563

Description

@Computerdores

Version and Platform (required):

  • Binary Ninja Version: 6.0.10601 (can't easily test dev for packaging reasons)
  • Edition: Personal
  • OS: NixOS
  • OS Version: 26.05
  • CPU Architecture: x64

Bug Description:
Importing and using binaryninja.interaction.show_graph_report causes pyright evaluation time to rise from 6s to ~40s.

Steps To Reproduce:

  1. Create test.py
  2. Paste:
from binaryninja.interaction import show_graph_report
show_graph_report(1, 2)
  1. Run pyright --outputjson test.py
  2. Observe timeInSec to be vastly larger than normal (~40s for my system)
  3. Comment out show_graph_report(1, 2)
  4. Rerun pyright and observe timeInSec of below 1s

Expected Behavior:
Importing show_graph_report should not cause a drastic increase in pyright evaluation time.

Screenshots/Video Recording:
If applicable, please add screenshots/video recording here to help explain your problem.

Binary:
If applicable, please provide us with the binary to help us work with the issue faster. Here are a few options:

Additional Information:
I'm using this to get pyright to discover the api in my dev env:

BINJA_ROOT=$(cat "$HOME/.binaryninja/lastrun" | tr -d '\n')
export PYTHONPATH="$BINJA_ROOT/python:$PYTHONPATH"

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions