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 ISourceText for file contents instead of string[] #777

Merged
merged 2 commits into from
May 3, 2021

Conversation

baronfel
Copy link
Contributor

@baronfel baronfel commented May 3, 2021

This changes the definition of VolatileFile.Lines from string[] for a few reasons:

  • should reduce allocations somewhat due to us no longer re-creating the ISourceText to pass into compiler methods each time they are called
  • makes it easier to port/unify logic for codefixes/editor features from dotnet/fsharp, since those work off of an ISourceText interface
  • allows us to more easily experiment with different ISourceText implementations, potentially ones that allocate much less.

@baronfel baronfel merged commit 0a2dc07 into ionide:master May 3, 2021
@baronfel baronfel deleted the isourcetext branch May 3, 2021 16:13
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.

1 participant