Skip to content

perf: optimize main class picker ordering - #1712

Closed
Deleted user (ghost) wants to merge 2 commits into
mainfrom
unknown repository
Closed

Deleted user (ghost) wants to merge 2 commits into
mainfrom
unknown repository

Conversation

@ghost

Copy link
Copy Markdown

Summary

This change reduces unnecessary work in the main class picker by avoiding mutation of caller-owned arrays and by caching the active editor path while reordering recent quick-pick entries.

Why

The picker can get large result sets, and the current code was repeatedly calculating the active file path for each option while also sorting the original array in place. This creates extra work for every launch flow and can make the quick pick noticeably slower when there are many Java main classes.

Changes

  • Sort a copied array instead of the caller-owned input array
  • Cache the active editor file path once per pick
  • Reuse the sorted options rather than re-reading the same data repeatedly

Validation

  • npm run compile

Pgns-bsb and others added 2 commits October 10, 2026 14:09
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Avoid mutating caller-owned arrays and cache the active editor path while reordering recent quick-pick items.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant