Skip to content

Commit edf3ae1

Browse files
nabeelbukhariNabeel Bukhari
andauthored
remove memoization to reduce memory pressure (#214)
Co-authored-by: Nabeel Bukhari <[email protected]>
1 parent b559a08 commit edf3ae1

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/ast.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import { isAbstractType } from "graphql/type";
3333
import { CompilationContext, GLOBAL_VARIABLES_NAME } from "./execution";
3434
import createInspect from "./inspect";
3535
import { getGraphQLErrorOptions, resolveFieldDef } from "./compat";
36-
import { memoize4 } from "./memoize";
3736

3837
export interface JitFieldNode extends FieldNode {
3938
/**
@@ -627,14 +626,7 @@ function getFieldEntryKey(node: FieldNode): string {
627626

628627
export { resolveFieldDef };
629628

630-
/**
631-
* A memoized collection of relevant subfields in the context of the return
632-
* type. Memoizing ensures the subfields are not repeatedly calculated, which
633-
* saves overhead when resolving lists of values.
634-
*/
635-
export const collectSubfields = memoize4(_collectSubfields);
636-
637-
function _collectSubfields(
629+
export function collectSubfields(
638630
compilationContext: CompilationContext,
639631
returnType: GraphQLObjectType,
640632
fieldNodes: FieldNode[],

0 commit comments

Comments
 (0)