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

[fleche] Cache document creation #380

Merged
merged 3 commits into from
Feb 18, 2023
Merged

[fleche] Cache document creation #380

merged 3 commits into from
Feb 18, 2023

Conversation

ejgallego
Copy link
Owner

Some clients, such as Visual Studio Code, may open / close buffers
aggressively when working, this creates some extra load as we don't
cache document creation.

This PR does cache it. In general this has a very low footprint on
memory by itself, as the root state is shared across all buffers, but
of course, the documents themselves could be a big load, but that's
already the case so we don't make things worse.

Fixes #363

[Test suite passes ;)]

This doesn't seem useful anymore.
Some clients, such as Visual Studio Code, may open / close buffers
aggressively when working, this creates some extra load as we don't
cache document creation.

This PR does cache it. In general this has a very low footprint on
memory by itself, as the root state is shared across all buffers, but
of course, the documents themselves could be a big load, but that's
already the case so we don't make things worse.

Fixes #363

[Test suite passes ;)]
@@ -22,7 +22,7 @@ let memo_cache_file = ".coq-lsp.cache"

let memo_save_to_disk () =
try
Fleche.Memo.save_to_disk ~file:memo_cache_file;
(* Fleche.Memo.save_to_disk ~file:memo_cache_file; *)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to comment these out?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the stuff in Memo was really dead code so I've removed it, I'd like to keep these ones as stubs for now tho.

@ejgallego ejgallego merged commit d4f2fd0 into main Feb 18, 2023
@ejgallego ejgallego deleted the cache_create branch February 18, 2023 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fleche] Cache Doc.create
2 participants