Skip to content

Use smaller keys in language service caches #6028

Description

@cartermp

#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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions