Skip to content

Conversation

@JonatanWaern
Copy link
Contributor

  • Cache path resolver, invalidating as necessary
  • Cache file resolver calls

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR optimizes path resolution performance by implementing caching mechanisms at two levels: caching the path resolver itself and caching individual file resolution calls. This should significantly improve server startup time, particularly for complex include trees.

  • Caches the PathResolver instance to avoid repeated reconstruction
  • Adds caching for individual path resolution results using a RefCell-wrapped HashMap
  • Updates workspace management to invalidate the cached resolver when workspaces change

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/server/mod.rs Updates initialization to pass output parameter for workspace updates
src/file_management.rs Adds path resolution result caching with RefCell HashMap and cache lookup wrapper
src/actions/notifications.rs Updates workspace folder change handler to pass output parameter
src/actions/mod.rs Implements PathResolver caching with invalidation on workspace changes
CHANGELOG.md Documents the performance improvement for path resolution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
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.

2 participants