microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.74k stars 29.1k forks source link

Workplace Hybernation #232329

Open Xyncgas opened 5 hours ago

Xyncgas commented 5 hours ago

Improves large project loading by allowing extension to access a first class citizen api that would be provided by the program for hybernation purposes, entering the workplace would then resume from the snapshot, allowing intellisense and inferenced types to kick in for software developers in a faster manner.

For large project having 100+ libraries to be loaded for example, there would be one single thing to do that's loading the snapshot to recover the state of previous workplace or a user can start clean, instead of restoring projects then checking types then highlighting etc...

It can be taking a lot disk space, while there is now an oppertunity to optimize the hybernation image by running garbage collection etc when the image is cold (stored via hybernation), so resuming would provide a cleaner and faster workplace to the users and the chores can be done in the background if that's an option for user to choose so the workplace would be worked on by the chores and what other things we can do to it while users are not using it.

Having workplace snapshot opens a new dimension of experience, for example the snapshot is transformed to a safe mode and it can be share with someone to work with, and the snapshot can be implemented in a way so a modified version of the workplace's snapshot can be created by a delta of the snapshot of yesterday's original version of the workplace so not only can people get fully functional ready to go environment that's cached to be portable but they can just as easily to switch between yesterday and today's and tomorrow's states

Imagine, simply opening a workplace and it would be ready to go in 3 second because you have NVME SSD and DDR5 Ram

Xyncgas commented 4 hours ago

In the future, instead of opening a directory and modification in the workplace would affect actual files on the directory, creating a workplace would clone from the local directory or remote repository, and objects are tracked by the workplace, it's its own things without actual files to be touched by the developers

But developer can run an 'appeal' command and the workplace creates inside the managed directory a temporary directory that presents all the current files so developers can modify that directory and changes can be tracked by the workplace and the temporary directory is removed

without appealing, there would be no directory, a workplace to dev is a binary file that can be clicked or executed or opened and the entire project is resumed from there

Xyncgas commented 4 hours ago

Compression can be run on the workplace so a lot things are removed leaving only source code