Closed object88 closed 6 years ago
Should use GOROOT information (loader override, env, runtime, etc) to check to see if the packages for the necessary stdlib are already loaded. If so, provide these to the type checker and don't reload.
May also want to consider sparsely loading: consider all stdlib packages to be shared, but only read in packages are they are required by loaded projects. Additionally, may want to keep a reference count from open projects, and track when projects are unloaded to free memory for unused packages.
All packages are now commonly available based on OS & Arch.
Looking forward to when multiple workspaces are expected to run at the same time, we want to be able to share certain (presumably static) resources. When a workspace loads, if we already have the stdlib packages in place, we can save time from reloading them, and save memory from duplicating them.