Skip to content

perf(query-compiler): reduce graph translation allocations#5824

Draft
tensordreams wants to merge 8 commits into
mainfrom
prisma-client-perf-graph-translation-cleanups
Draft

perf(query-compiler): reduce graph translation allocations#5824
tensordreams wants to merge 8 commits into
mainfrom
prisma-client-perf-graph-translation-cleanups

Conversation

@tensordreams

Copy link
Copy Markdown
Contributor

Stacked performance split from the ongoing Prisma Client performance work.

What changed:

  • Reduces query graph translation allocations by reusing graph edges, trimming single-root/single-result scaffolding, caching result reachability, and avoiding synthetic read-query names.

Why:

  • Keeps this review unit small while preserving the measured allocation/runtime cleanup from the larger performance branch.

Validation:

  • See wip/client-performance-pr-stack.md on the Prisma status branch for the exact local check set recorded for this split.

CI linkage:
/prisma-branch prisma-client-performance-2026-06-08

Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4fd6f4a7-fd18-4e9c-ae59-4afb6833f76c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch prisma-client-perf-graph-translation-cleanups
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch prisma-client-perf-graph-translation-cleanups

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CLAassistant

CLAassistant commented Jun 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codspeed-hq

codspeed-hq Bot commented Jun 25, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 11 untouched benchmarks
⏩ 11 skipped benchmarks1


Comparing prisma-client-perf-graph-translation-cleanups (3cda3ca) with main (1171e96)

Open in CodSpeed

Footnotes

  1. 11 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions

Copy link
Copy Markdown
Contributor

Wasm Query Compiler File Size

Engine This PR Base branch Diff
Postgres 3.509MiB 3.508MiB 990.000B
Postgres (gzip) 1.144MiB 1.143MiB 670.000B
Postgres (size-optimized) 1.768MiB 1.767MiB 838.000B
Postgres (size-optimized, gzip) 695.770KiB 695.609KiB 165.000B
Mysql 3.462MiB 3.461MiB 993.000B
Mysql (gzip) 1.128MiB 1.128MiB 542.000B
Mysql (size-optimized) 1.738MiB 1.737MiB 846.000B
Mysql (size-optimized, gzip) 684.656KiB 684.338KiB 325.000B
Sqlite 3.379MiB 3.378MiB 982.000B
Sqlite (gzip) 1.100MiB 1.099MiB 602.000B
Sqlite (size-optimized) 1.694MiB 1.693MiB 830.000B
Sqlite (size-optimized, gzip) 667.621KiB 667.395KiB 231.000B
SQL Server 3.597MiB 3.596MiB 959.000B
SQL Server (gzip) 1.161MiB 1.161MiB 670.000B
SQL Server (size-optimized) 1.767MiB 1.766MiB 659.000B
SQL Server (size-optimized, gzip) 698.544KiB 698.453KiB 94.000B
CockroachDB 3.559MiB 3.558MiB 959.000B
CockroachDB (gzip) 1.162MiB 1.162MiB 173.000B
CockroachDB (size-optimized) 1.793MiB 1.792MiB 834.000B
CockroachDB (size-optimized, gzip) 705.773KiB 705.562KiB 216.000B

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