Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Revert https://github.com/graphql/dataloader/pull/222#386

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
NShahri wants to merge13 commits intographql:main
base:main
Choose a base branch
Loading
fromNShahri:remove-extra-promises

Conversation

@NShahri
Copy link

@NShahriNShahri commentedNov 1, 2025
edited
Loading

Why#222 Should Be Reverted

  1. Real-World Applications Have Complex Resolver Patterns
    In large-scale applications, many resolvers fetch different entities with varying keys and in unpredictable orders. It’s unrealistic to expect all keys for a given entity to be available in the same tick. Designing the batching logic around this assumption leads to brittle behavior and missed optimization opportunities.
  2. Excessive Promise Creation Harms Performance
    This implementation creates new Promise instances—even when they’re not strictly necessary. In large-scale Node.js applications, this can lead to significant performance degradation. Node.js event loop and garbage collector performance drops dramatically when thousands of unresolved promises accumulate.
  3. Batching Behavior Should Be Internally Managed and Predictable
    Batching is an internal optimization detail of the module and should not rely on external timing guarantees. If some keys are waiting to be loaded in the current tick, the module should proactively plan to batch them—even if more keys arrive in the next tick. This ensures consistent and efficient data loading behavior.

NShahriand others added13 commitsOctober 28, 2025 23:48
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@NShahri

[8]ページ先頭

©2009-2025 Movatter.jp