Merge lazy resolution into Dataloader#5422
Merged
Conversation
Contributor
|
That’s interesting… so I could just go through and queue a whole bunch of evaluate_selections across fields and scopes, then just run dataloader once at the end of everything and then go through collecting results? Sound like a nice simplification! |
… in FlatDataloader; eagerly resolve mutation fields
…ation; fix backtrace_spec
rmosolgo
commented
Sep 2, 2025
Owner
Author
|
Performance was pretty bad with FlatDataloader (extracted from #5389) because it was creating Procs from passed-in blocks. Instead, I moved Lazy resolution into the existing - 14.140 (± 0.0%) i/s (70.72 ms/i) - 142.000 in 10.047317s
+ 14.245 (± 0.0%) i/s (70.20 ms/i) - 143.000 in 10.040795s
Total allocated: 9424424 bytes (75415 objects)(Same memory footprint) |
7 tasks
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.
Extracted from #5389
Unify resolution of Lazy objects (Promises) with Dataloader.
TODO:
Resolveback to the project with deprecation warningssteps_to_rerun_after_lazyif it's unusedcc @gmac perhaps relevant to your interests, this change would make
dataloader.rundo everything