[WIP] Lazy load projects #1957
[WIP] Lazy load projects #1957
Analysis complete
Summary
This pull request adds a new feature for Ionide that allows users to enable or disable lazy loading of F# projects in the workspace. Lazy loading improves the performance and memory usage of Ionide when working with large or complex solutions by loading the projects on demand when opening F# files. The feature involves changes in several modules, such as Project
, SolutionExplorer
, DTO
, MSBuild
, and fsharp
, and a new option in package.json
.
Walkthrough
- Add a new configuration option
FSharp.lazyLoadWorkspace
to enable lazy loading of F# projects in the workspace (link) - Modify the
Project
module to implement the lazy loading feature, which loads the corresponding project on demand when opening an F# file, instead of loading all the projects in the workspace at once (link, link) - Modify the
Project
module to take anExtensionContext
parameter in theinitWorkspace
andinitWorkspaceHelper
functions, which is needed to register the event handler for opening F# files (link, link, link) - Modify the
DTO
module to add a new record typeWorkspacePeekFsproj
, which represents an F# project file with its compile items, and change theWorkspacePeekFound.Directory
type to contain an array ofWorkspacePeekFsproj
records instead of strings (link, link) - Modify the
Project
module to map theWorkspacePeekFsproj
records to strings or tuples of project file paths and compile items, as needed by the existing functions that return or take lists or arrays of project file paths (link, link, link, link) - Modify the
SolutionExplorer
andfsharp
modules to pass theExtensionContext
parameter to theProject.initWorkspace
function, which now requires it as part of the lazy loading feature (link, link, link) - Modify the
SolutionExplorer
module to take a string parameter instead of aWorkspacePeekFsproj
record in thegetProjItem
function, which is used to create the solution explorer tree (link) - Remove a trailing whitespace from the end of the
release/package.json
file (link)
Poem
Oh, we're the coders of Ionide, and we work on F# all day
We load the projects lazily, to save some memory
We pass theExtensionContext
to theinitWorkspace
function
And we heave ho, on the count of three, to update theWorkspacePeek
junction
Emoji
ππ²π οΈ
Include these descriptions in your pull request description by including the following marker tags:
copilot:all
: all the content, in one gocopilot:summary
: a one paragraph summary of the code changescopilot:walkthrough
: a step by step walkthrough of the code changescopilot:poem
: a poem about the code changes!copilot:emoji
: three emoji that capture the changes
Feedback is welcome. Simply add a comment to this PR of the form /copilot feedback [your comments here]
.
Details
Copilot for PRs is a limited technical preview from GitHub Next.
It's aim is to make it easier to write pull request descriptions by providing automatically generated suggestions based on the code changes.
To find out more go to https://githubnext.com/projects/copilot-for-pull-requests or come and chat with us on Discord
File | Status | Duration |
---|---|---|
Summary & Walkthrough | β Finished | 69.2 seconds |
release/package.json | β Finished | 50.2 seconds |
src/Components/MSBuild.fs | β Finished | 48.5 seconds |
src/Components/SolutionExplorer.fs | β Finished | 50.3 seconds |
src/Core/DTO.fs | β Finished | 50.3 seconds |
src/Core/Project.fs | β Finished | 54 seconds |
src/fsharp.fs | β Finished | 48.5 seconds |