microsoft / microsoft/WinAppVSCE
IntelliSense: add per-document analysis cache to avoid redundant XML parsing
Nobody has claimed this yet.
- 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/findParentPathand 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
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.
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