Gusto's GraphQL resolvers extensively use a pattern called loadAndDispatch() that defeats DataLoader batching, causing every chained DataLoader call to dispatch with a batch size of 1. This was identified as the primary driver of DataLoaderHelper being the #1 allocation source in production (48,910 samples / 11.6% of all allocations).
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
| package net.bytebuddy; | |
| import net.bytebuddy.agent.ByteBuddyAgent; | |
| import net.bytebuddy.agent.builder.AgentBuilder; | |
| import net.bytebuddy.description.type.TypeDescription; | |
| import net.bytebuddy.dynamic.ClassFileLocator; | |
| import net.bytebuddy.dynamic.DynamicType; | |
| import net.bytebuddy.dynamic.loading.ClassInjector; | |
| import net.bytebuddy.implementation.MethodDelegation; | |
| import net.bytebuddy.implementation.bind.annotation.SuperCall; |
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
| whatamidoing |
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
| whatamidoing |