I’m running into what looks like a performance issue with Absinthe Dataloader. In addition to using dataloader for vanilla field resolution from ecto, I’m also using run_batch/5
as a way to efficiently compute aggregate values for nested fields (think having a field friends_count
on entity Profile
, and retrieving a list of profiles… you want to run a single query to get all the counts).
Looking through NewRelic, I’m seeing individual field resolution calls take 100ms+:
This may either be an instrumentation issue, or my lack of understanding, but I expected there to be a single db call per aggregate (which is the case on sql side) and then fast resolution since they’re just map lookups. Are the resolvers just awaiting the db call and then all running in parallel? Or is something else going on?