microsoft / microsoft/language-server-protocol

Allow store and retrieve for workspace/symbols request

Open
#973 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request workspace symbols
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

For a modest project with 40k symbols (mainly system SDKs I like to browse easily) this translates to 10MB of JSON text. Even though 99% of the files don't change often, or ever I am required to send this text for every request back to the client who must then deserialize it so it can be displayed/sorted in the editor (I am aware of query string but that's another issue with potential solutions).

I would like to propose a syntax which allows me to send this data once to the client (which can then store it in client-side memory) and then request it to be retrieved later from server.

The model follows:

  • Associate a unique ID with a symbol (perhaps an additional field in SymbolInformation which invalidates the need for other fields)
  • Send all symbols in workspace to client upon the initial workspace/symbols request (or when files change)
  • On subsequent requests send the ID to the client which can then use that as key to look up the data which was sent previously.

Is this a feasible approach? Currently as it's designed sending 10MB of text for each request is untenable for performance and abusive on system resources.

Contributor guide

No contributing guide indexed for this repository

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 reviewing the workspace/symbols request and the SymbolInformation model described in the issue. The issue proposes a protocol-level storage and retrieval design, so done would require an agreed feasible approach and corresponding specification changes; no implementation file or test is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.