Probably an odd use case, but when having to a lot of disjointed AST nodes, APIs like printAstCompact force the creation of an AstPrinter instance on every print call, which in turns allocates a Map to register all printers. The constructor is private. This can quickly become an issue when printing a large amount of nodes. Let me know if you have a preference on how to handle this use case, I can submit a PR 🙇
Probably an odd use case, but when having to a lot of disjointed AST nodes, APIs like
printAstCompactforce the creation of anAstPrinterinstance on every print call, which in turns allocates aMapto register all printers. The constructor is private. This can quickly become an issue when printing a large amount of nodes. Let me know if you have a preference on how to handle this use case, I can submit a PR 🙇