[中] 飞机分析每次都重新哈希约 200 MB 模型
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- performance
Research direction
Start at windows/birdlock/core/aircraft.py:50-66: read AircraftPartsModel._load() and the verify_model() call it makes, then follow AircraftAnalyzer.start_analysis() and close() to confirm each analysis rebuilds the model object and discards the cached session. Add a process-level cache keyed by (path, st_size, st_mtime_ns) around the verification result so the first load still hashes fully. Done when a second consecutive aircraft analysis skips the ~203 MB hash while a changed AircraftParts.onnx still triggers re-verification; time two runs on Windows to confirm the startup gain, since the report was derived from an audit rather than a live repro.
Written by the indexing model from the issue text.
Description
位置:windows/birdlock/core/aircraft.py:50-66
现象:AircraftPartsModel._load() 调用 verify_model() 完整读取并哈希模型(AircraftParts.onnx 约 203 MB);AircraftAnalyzer 每次 start_analysis() 新建实例、结束 close() 释放 session,下一次分析又重新哈希。
复现:连续两次进入飞机分析,观察启动耗时。
建议:进程内按 (path, st_size, st_mtime_ns) 缓存校验结果(首次仍完整哈希)。
来源:2026-11-15 全仓只读审计,PR #7 未包含此项。 未在 Windows 实机复现,复现路径由代码审计推得。
- Dominant language
- Swift
- Stars
- 2
- Forks
- 2
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cyandee/BirdLock
-
Difficulty 2/5 Under an hour Newbie friendliness 62/100
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100