Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of large files #1470

Closed
svenefftinge opened this issue Mar 9, 2018 · 3 comments
Closed

Improve handling of large files #1470

svenefftinge opened this issue Mar 9, 2018 · 3 comments
Assignees

Comments

@svenefftinge
Copy link
Contributor

Currently, we keep the document buffers on the client and send the full file contents back and forth on save and some other operations (LSP). This is, of course, a bit naive and needs improvements.

I propose that we move the resources and documents to the backend, such that the communication between the monaco model and the backend documents will go through text edits and versioned documents. The contents only should need to be transferred once, when opening an editor. Fetching contents could be done through a regular GET, such that we don't need to wrap large files in JSON objects, hence can omit the parsing. The language clients could be moved to the backend, too.

@svenefftinge
Copy link
Contributor Author

This also should be a good step towards collaborative editing and a sandboxed extension system like VS Code's.

@svenefftinge
Copy link
Contributor Author

Before we go down that road, which will change some important parts in the architecture, we would like to try improving the protocol in the fs, to work with incremental changes.

The idea is that we

  • fetch the contents on open once (through GET)
  • use hashes to communicate and compare document contents in file changes
  • send text edits instead of full contents on change

@akosyakov
Copy link
Member

I don't think it is feasible anymore after #7908 We will need to open an issue in VS Code to apply such improvements there first.

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

No branches or pull requests

2 participants