question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancements to handling large files in remote scenarios

See original GitHub issue

In discussion with @derekbekoe, @curib, @connor4312, @aeschli, @alexdima, and @chrisdias a few weeks ago, we discussed enhancements to how VS Code handles large files for remote scenarios.

Some observations from @derekbekoe:

  • Looks like VS Code blocks/queues file downloads so if I try to open a large file then a small file afterwards, the small file doesn’t open until the large file has finished?
  • Related to the above, it appears it’s not possible to cancel a large file download? Closing the file tab doesn’t appear to stop the download.
  • There is a warning for some file types (like The file is not displayed in the editor because it is either binary or uses an unsupported text encoding) but should one be added for opening large files in remote scenarios?

Tentatively assigning @connor4312 and @aeschli as we discussed this in the context of Remote Tunnels, but let me know if I should move to the core repo or update assignment.

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:1
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
bpaserocommented, Dec 20, 2022

Talked with @joaomoreno , distilled 3 things:

  • we do not cancel when you close a tab but we cover that in https://github.com/microsoft/vscode/issues/57585
  • we can show a warning when opening large files (maybe configurable) where we have custom defaults based on using vscode-remote scheme or not, I think we do not need a new capability for this (see [1] for example)
  • the remote connection seems to be busy dealing exclusively with the response from the remote not allowing other IPC messages, so maybe we need some kind of quality of service in our IPC layer to allow for other IPC messages to get through (I am not an expert in our remote management connection implementation)

[1] Warning in Editor image

1reaction
alexdimacommented, Dec 22, 2022

Thanks for the clarification! You’re correct, implementing this in a way which can utilise the available bandwidth is quite tricky 🤔 . For example, with a client - server latency of 200ms, if the client reads 64KB chunks at a time, then the maximum theoretical bandwidth is 192KB/s:

  • 0ms: the client asks for the first 64KB chunk
  • 200ms: the server receives the request and sends the first chunk
  • 400ms: the client receives the first 64KB chunk and asks for the next chunk
  • 600ms: the server receives the request and sends the second chunk
  • 800ms: the client receives the second 64KB chunk and asks for the next chunk
  • 1000ms: the server receives the request and sends the third chunk
  • 1200ms: the client receives the third 64KB chunk

In order to utilise the available bandwidth, I think the IPC layer needs to either expose the underlying’s socket drain events, write buffer size, etc. or maybe we can support returning a Stream or Promise<Stream> natively in the IPC layer and do the right thing internally to align the writing speed with the TCP/IP socket writing speed, all while allowing other IPC messages to go through. cc @joaomoreno

Read more comments on GitHub >

github_iconTop Results From Across the Web

4 Scenarios for Fast and Secure Remote Worker Data Access
If your files are too big for the EFSS or CCP solutions, then you will need an alternative. The problem with these solutions...
Read more >
Processing Large file from remote dynamic source using ...
I have a use case to read large files from dynamic sources, a source could be either an S3 bucket or a remote...
Read more >
10 Secure File Sharing Options, Tips and Solutions - Varonis
In this article, we'll look at the different scenarios where file sharing ... Allows you to transfer large files over a network connection....
Read more >
Handling Large Messages with Apache Kafka (CSV, XML ...
Here is a detailed example of processing large XML files with Kafka Connect and the open-source File Pulse connector: “Streaming data into ...
Read more >
Git Large File Storage (LFS) - GitLab Documentation
Git LFS v1 original API is not supported, because it was deprecated early in LFS development. When SSH is set as a remote,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found