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

Introduce async SourceFileProvider interface #97

Merged

Conversation

Adjective-Object
Copy link
Collaborator

Adds a common interface that in future changes will be implemented
with a faster alternate that avoids scanning all files in the program
during initialization

As part of this work, I rework consumers of TypeScriptProgram to be
asyncronous, and add runWithConcurrentLimit to fence check in parallel.
This is needed because if we were to check all fences in parallel we
would hit the system RLIMIT by opening all fences simultaneously.
I also let runWithConcurrentLimit display a progress bar to give user
feedback while performing fence checks. This does not display during
provider initialization, but this is less of a problem against the (yet
to come) newer implementation that doesn't perform ts program
initialization.

Adds a common interface that in future changes will be implemented
with a faster alternate that avoids scanning all files in the program
during initialization

As part of this work, I rework consumers of TypeScriptProgram to be
asyncronous, and add runWithConcurrentLimit to fence check in parallel.
This is needed because if we were to check all fences in parallel we
would hit the system RLIMIT by opening all fences simultaneously.

And while I'm in there, I added a progress bar to give user feedback
while performing fence checks. This does not display while performing
provider initialization, but this is less of a problem against the (yet
to come) newer implementation that doesn't perform full typescript
program initialization.
@Adjective-Object
Copy link
Collaborator Author

This change (commit)(branch) that introduces the faster provider is blocked on this change.

Copy link
Owner

@smikula smikula left a comment

Choose a reason for hiding this comment

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

Just one small comment.

@Adjective-Object Adjective-Object mentioned this pull request Aug 11, 2021
@smikula smikula merged commit eb572f4 into smikula:master Aug 11, 2021
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