Skip to content

refactor(nls): use then for JSON parsing #247013

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

Merged
merged 1 commit into from
Apr 27, 2025

Conversation

bytemain
Copy link
Contributor

In the original code, using await inside each readFile call within Promise.all made them execute sequentially, negating the parallel execution benefit of Promise.all. The refactored version uses .then to parse JSON after readFile promises resolve, enabling all operations in Promise.all to run truly in parallel.

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

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

Good catch!

@bpasero bpasero added this to the April 2025 milestone Apr 27, 2025
@bpasero bpasero merged commit 29d5ffd into microsoft:main Apr 27, 2025
7 checks passed
btwiuse pushed a commit to btwiuse/vscode that referenced this pull request Apr 27, 2025
btwiuse pushed a commit to btwiuse/vscode that referenced this pull request Apr 27, 2025
btwiuse pushed a commit to btwiuse/vscode that referenced this pull request Apr 27, 2025
NikolaRHristov pushed a commit to CodeEditorLand/Editor that referenced this pull request Apr 30, 2025
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.

5 participants