Vector35 / Vector35/binaryninja-api
`pyright` type checking is very slow
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 1.3k
- Fork
- 298
- Merge trung bình
- 5 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 19
Mô tả
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:
- Create
test.py - Paste:
from binaryninja.interaction import show_graph_report
show_graph_report(1, 2)
- Run
pyright --outputjson test.py - Observe
timeInSecto be vastly larger than normal (~40s for my system) - Comment out
show_graph_report(1, 2) - Rerun pyright and observe
timeInSecof 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"
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Start by reproducing the issue with the test.py example and pyright --outputjson, comparing results with and without show_graph_report(1, 2). Trace the binaryninja.interaction.show_graph_report API and its exposed type information to identify what causes the evaluation slowdown. Done means importing and using it no longer causes the reported drastic increase in pyright time.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- developer-experience, performance
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 52/100