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

Use in-memory file system for virtual documents (if available) #356

Open
krassowski opened this issue Sep 11, 2020 · 3 comments
Open

Use in-memory file system for virtual documents (if available) #356

krassowski opened this issue Sep 11, 2020 · 3 comments

Comments

@krassowski
Copy link
Member

What are you trying to do?

Improve the performance by storing the virtual documents on ramdisk. I've used ramdisk before from Python, but this time looking at pyfilesystem's memoryfs hoping it will give us cheap cross-platform support:

How is it done today, and what are the limits of current practice?

We are writing and reading a lot form the disk. For those who have SSD disks the speed is ok, but it must be a pain for others; even for those who have SSD, it would help them as the longevity of the SSDs will increase.

This might require that the virtual file system is symlinked to the project (or maybe not - we will see).

Related to slow autocompletion (#272) and other improvements to virtual documents #353 , #336

@krassowski krassowski added this to the 2.1 milestone Sep 11, 2020
@bollwyvl
Copy link
Collaborator

bollwyvl commented Sep 11, 2020 via email

@krassowski
Copy link
Member Author

Right, it would be useful to disable this workaround if one only uses LSP servers/features that do not require a file on disk.

Had a look into pyfilesystem and unfortunately is not fit for the task as it does not give the on-disk path for the memory filesystem (i.e. it seems it uses a custom implementation rather than standard ramdisk which can be mounted to any directory) so we cannot give a valid path to the LSP servers.

It seems that using Linux ramdisk and ImDisk/SoftPerfect RAM Disk for Windows would be the way forward. This all should be wrapped in a huge try-catch and fallback to a static directory or tmpdir.

@bollwyvl
Copy link
Collaborator

bollwyvl commented Sep 21, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants