A more memory efficient AstPrinter by bbakerman · Pull Request #4028 · graphql-java/graphql-java · GitHub
Skip to content

A more memory efficient AstPrinter#4028

Merged
bbakerman merged 1 commit into
masterfrom
singleton-ast-printer
Jul 4, 2025
Merged

A more memory efficient AstPrinter#4028
bbakerman merged 1 commit into
masterfrom
singleton-ast-printer

Conversation

@bbakerman

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

@xuorig xuorig left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

As an aside:

It could be great to add an API that allows users to pass their own string builder for flexibility. That allows things like reserving the capacity needed, or reusing string builders, which we both currently do in a custom printer.

    public static StringBuilder printAst(Node node, StringBuilder out) {
        printAstTo(node, out);
        return out
    }

@bbakerman

bbakerman commented Jun 29, 2025

Copy link
Copy Markdown
Member Author

@bbakerman bbakerman merged commit f3c1a49 into master Jul 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants