Repository navigation
perf: use iterative loops in waitForCondition, asyncmap, and asyncfilter - #91
Merged
mykola-mokhnach merged 1 commit intoNov 11, 2026
Conversation
mykola-mokhnach
left a comment
Contributor
There was a problem hiding this comment.
No general findings; see inline comments.
Contributor
Author
|
Thanks @mykola-mokhnach! Addressed all three inline comments:
|
mykola-mokhnach
left a comment
Contributor
There was a problem hiding this comment.
No general findings; see inline comments.
mykola-mokhnach
left a comment
Contributor
There was a problem hiding this comment.
- [major]
lib/wait-for-condition.ts:41-45: the branch predates #92 (error hierarchy), which is now on master. Master throwsConditionUnmetErrorat both sites, imports it, and documents it in the JSDoc. This PR's removed and added lines use plainError. Merging as is gives a conflict, or a resolution that reverts toError. In that caseinstanceof ConditionUnmetErrorandinstanceof TimeoutErrorand the error-code checks stop matching. Please rebase onto master and keepConditionUnmetErrorin both throws.
hoanle0126
force-pushed
the
perf/iterative-wait-and-serial-loops
branch
from
November 11, 2026 08:07
ddbf19c to
92d3e33
Compare
Contributor
Author
mykola-mokhnach
approved these changes
Nov 11, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 11, 2026
## [6.6.1](v6.6.0...v6.6.1) (2026-11-11) ### Performance Improvements * use iterative loops in waitForCondition, asyncmap, and asyncfilter ([#91](#91)) ([975f44e](975f44e))
|
🎉 This PR is included in version 6.6.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
return await spin()call inwaitForConditionwith afor (;;)loop so long-running polling loops do not chain pending promises across polls.coll.reduceinasyncmapandasyncfilterwhenoptions === falsewith indexed loops overcoll.slice(), avoiding quadratic array spread allocations inasyncmapand upfront promise chain creation while preserving sparse-array hole skipping and upfront element snapshots.