[perf-scan] 2026-10-19 -- performance opportunities found
Maintainers usually reply within 2 days
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
- cli, performance
Research direction
Read src/apm_cli/commands/uninstall/engine.py around lines 633–671 and trace how matched_dep and packages_to_remove are built. Check how package identity and ordering are handled, then add a companion set for membership checks while retaining the list. Done means duplicate entries are still excluded, output order is preserved, and the uninstall behavior remains correct.
Written by the indexing model from the issue text.
Description
Performance Scan - 2026-10-19
Automated scan of src/apm_cli/ for algorithmic performance anti-patterns.
1 finding(s) identified (low priority).
Findings
[B] Linear scan inside a loop -- src/apm_cli/commands/uninstall/engine.py:633-671
- Current: O(n*m) --
if matched_dep not in packages_to_removedoes a list membership test on every iteration of thefor package in packagesloop. - Proposed: O(n) with a companion set of seen entries.
- Fix: Keep a
seenset next to thepackages_to_removelist (when entries are hashable, or key byget_identity()), check it instead of the list, and keep the list for ordering. - Note: low priority; the
uninstallpackage list is typically small (user-typed args).
Scan coverage
- src/apm_cli/ (489 files scanned)
- Patterns checked: A (quadratic loops), B (linear scan in loop),
C (unconditional expensive ops), D (redundant config parsing),
E (heavy top-level imports), F (sequential independent I/O) - Depth: Pattern A/B hot spots were reviewed by sampling the highest-count files; the other patterns were not exhaustively confirmed.
Generated by Daily Performance Scanner · copilot · auto · 18.5 AIC · ⌖ 0.561 AIC · ⊞ 11.1K · ◷
- expires on Oct 26, 2026, 1:36 AM UTC
- Dominant language
- Python
- Stars
- 4k
- Forks
- 393
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 62
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 microsoft/apm
-
type/automation type/performance
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
Maintainers usually reply within 2 days
-
type/automation type/performance
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 2 days
-
status/accepted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/apm#3259 · 1 comment ·
Maintainers usually reply within 2 days
-
type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 2 days
Similar issues
-
idxmax/idxmin raise ValueError when a single partition is all-NAPossibly taken @Jason10191019999 claimed this today. Openneeds triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
[BUG]: Windows GUI package of v1.17.0-rc3 has no GTK DLLsPossibly taken @andrut-ds claimed this today. Openbug CI/CD Pactus-GUI Windows
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pactus-project/pactus#2428 ·
Maintainers usually reply within 1 day
-
DiskDataset.reshard() can hang with a zero or negative shard sizePossibly taken @Programmer-Develops claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 19 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
GNS3/gns3-server#3017 · 1 comment ·
Maintainers usually reply within 1 day