Skip to content

Unified: Speedup Print AST - #22706

Merged
hvitved merged 1 commit into
github:mainfrom
hvitved:unified/print-ast-speedup
Sep 30, 2026
Merged

hvitved merged 1 commit into
github:mainfrom
hvitved:unified/print-ast-speedup

Conversation

@hvitved

@hvitved hvitved commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@hvitved hvitved added the no-change-note-required This PR does not need a change note label Sep 30, 2026
@hvitved
hvitved marked this pull request as ready for review September 30, 2026 08:49
@hvitved
hvitved requested a review from a team as a code owner September 30, 2026 08:49
Copilot AI balanced review requested due to automatic review settings September 30, 2026 08:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The optimization preserves filtering semantics while reducing unnecessary AST processing.

Review effort: Balanced
Findings: None

What changed in this PR

Optimizes unified AST printing by filtering nodes earlier in query evaluation.

Changes:

  • Constrains PrintAstNode to printable nodes.
  • Restricts ordering calculations to printable parents and children.
File Description
unified/​ql/​lib/​codeql/​unified/​printAst.qll Moves filtering into the node class to reduce query workload.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@hvitved
hvitved requested a review from asgerf September 30, 2026 10:27
@hvitved
hvitved merged commit a7209e2 into github:main Sep 30, 2026
16 checks passed
@hvitved
hvitved deleted the unified/print-ast-speedup branch September 30, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Unified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants