microsoft / microsoft/WinAppVSCE

IntelliSense: add per-document analysis cache to avoid redundant XML parsing

Open
#134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement hold-fix performance
Dominant language
TypeScript
Stars
13
Forks
3
Avg merge
6d 1h
Merged PRs (30d)
11

Description

Summary

Each IntelliSense provider (completion, hover, definition, diagnostics) independently reparses the full document text on every request without caching.

Details

  • Completion calls getManifestCompletions(schema, document.getText(), ...)
  • Hover does the same full rescan
  • Definition re-reads text, prefixes, and XML context
  • Diagnostics revalidate from document.getText()
  • All paths rescan text in getXmlContext / findParentPath and reparse XML

Recommendation

Introduce a shared per-document analysis service/cache (prefix map, cursor context, parsed XML) that all providers consume, with cancellation-aware async refreshes.

Surfaced by PR review skill (alternative-solution dimension)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the completion, hover, definition, and diagnostics providers, then inspect getXmlContext and findParentPath to understand the repeated scans and XML parsing. Define the shared per-document analysis cache around the prefix map, cursor context, and parsed XML, with cancellation-aware refreshes. Done means all four providers consume the shared analysis without redundant reparsing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.