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

AdaptiveLSPServer improvements: Autocomplete Speed, Typechecking Progress, Memory Usage #1036

Merged
merged 54 commits into from
Jan 30, 2023

Conversation

TheAngryByrd
Copy link
Member

@TheAngryByrd TheAngryByrd commented Oct 29, 2022

Lots of changes that I've slowly worked on as part making Ionide for my giant work project.

This also incorporates all the autocomplete perf changes from #1028 and #1035

Autocomplete Speed up

This speeds up autocompletion by holding onto a cache of previous results and re-using it. On a giant file (4k lines long) I get pretty snappy autocompletes that are still accurate.

Autocomplete-speed-up

TypeChecking progress:

I've tied into the Workspace Progress LSP endpoints and gives updates to what file is currently being typechecked.

Additionally I am able to show the progress and how many files left to typecheck, however this is limited to the TextDocumentDidSave. In other cases it's an indeterminate progress bar.

image

image

typechecking-progress

This progress types are based on client capabilities type for the progress capabilities.

Memory usage

Seems like all the major memory usage is in the compiler now.

Screenshot_20221031_033315

This will be an issue with bigger projects but this needs discussion how it should work
openFilesToCheckedDeclarations was causing memory leaks by using the AMap.map(tick) function.  This has some strange caching of functions that was effectively saving every variation.
@TheAngryByrd
Copy link
Member Author

Will need ionide/LanguageServerProtocol#43 to go out before hand

@TheAngryByrd TheAngryByrd marked this pull request as ready for review January 11, 2023 00:59
@TheAngryByrd TheAngryByrd changed the title Typecheck progress POC AdaptiveLSPServer improvements: Autocomplete Speed, Typechecking Progress, Memory Usage Jan 11, 2023
src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs Outdated Show resolved Hide resolved
.vscode/launch.json Show resolved Hide resolved
paket.dependencies Show resolved Hide resolved
src/FsAutoComplete.Core/FileSystem.fs Outdated Show resolved Hide resolved
src/FsAutoComplete.Core/TypedAstUtils.fs Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants