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

Use smaller keys in language service caches #6028

Closed
cartermp opened this issue Dec 18, 2018 · 0 comments
Closed

Use smaller keys in language service caches #6028

cartermp opened this issue Dec 18, 2018 · 0 comments

Comments

@cartermp
Copy link
Contributor

#5944 was closed after #6001 came in because we have a different way that source files are passed into the language service, eliminating a large amount of allocations. However, these caches:

https://github.com/Microsoft/visualfsharp/blob/4b7ea0805935112cfaad884dadb7b1af17cdf190/src/fsharp/service/service.fs#L2472

https://github.com/Microsoft/visualfsharp/blob/4b7ea0805935112cfaad884dadb7b1af17cdf190/src/fsharp/service/service.fs#L2455

https://github.com/Microsoft/visualfsharp/blob/4b7ea0805935112cfaad884dadb7b1af17cdf190/src/fsharp/service/service.fs#L2999

All still end up storing an entire source file as a part of a key. This keeps large strings around needlessly. Instead, we should use a hash code (or some hash-like representation of the source) that we use as a part of the key. This should help further relieve memory pressure for larger solutions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant