LightOperationExecutor is a performance improvement over OperationExecutor for simple queries as it implements LightDataFetcher interface from GraphQL-Java #2953 and yields about 5% performance improvement in simple queries.
LightDataFetcher implementations do not require DataFetchingEnvironment for getting values and are considered cheaper to execute as DFE is not constructed for the query.
This also makes the DataFetchingEnvironment attribute of ResolutionEnvironment private and instead returns it via a getter since now it can either be a materialised object or wrapped in a Supplier. Also, I have removed some of the attributes of ResolutionEnvironment as it required DFE to be materialised.
LightOperationExecutor is a performance improvement over OperationExecutor for simple queries as it implements
LightDataFetcher
interface from GraphQL-Java #2953 and yields about 5% performance improvement in simple queries.LightDataFetcher implementations do not require
DataFetchingEnvironment
for getting values and are considered cheaper to execute as DFE is not constructed for the query.This also makes the
DataFetchingEnvironment
attribute ofResolutionEnvironment
private and instead returns it via a getter since now it can either be a materialised object or wrapped in aSupplier
. Also, I have removed some of the attributes ofResolutionEnvironment
as it required DFE to be materialised.