Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert rust 1.78 update #4865

Merged
merged 1 commit into from May 10, 2024
Merged

Revert rust 1.78 update #4865

merged 1 commit into from May 10, 2024

Conversation

SevInf
Copy link
Contributor

@SevInf SevInf commented May 10, 2024

Panics when integrated into the client.
https://github.com/prisma/prisma/actions/runs/9033927478/job/24825328380?pr=24151

This reverts commit e162a52.

@SevInf SevInf requested a review from a team as a code owner May 10, 2024 15:11
@SevInf SevInf requested review from jkomyno and removed request for a team May 10, 2024 15:11
@SevInf SevInf added this to the 5.14.0 milestone May 10, 2024
Copy link

codspeed-hq bot commented May 10, 2024

CodSpeed Performance Report

Merging #4865 will improve performances by 15.32%

Comparing rev-rust-1.77 (ac5af1b) with main (b046ee1)

Summary

⚡ 3 improvements
✅ 8 untouched benchmarks

Benchmarks breakdown

Benchmark main rev-rust-1.77 Change
validate (large) 357.6 ms 310.1 ms +15.32%
validate (medium) 77.9 ms 67.7 ms +14.99%
validate (small) 11 ms 9.5 ms +15.08%

Copy link
Contributor

github-actions bot commented May 10, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.152MiB 2.152MiB 0.000B
Postgres (gzip) 845.858KiB 845.857KiB 1.000B
Mysql 2.123MiB 2.123MiB 0.000B
Mysql (gzip) 832.881KiB 832.882KiB -1.000B
Sqlite 2.016MiB 2.016MiB 0.000B
Sqlite (gzip) 793.210KiB 793.211KiB -1.000B

Copy link
Contributor

@jkomyno jkomyno left a comment

Choose a reason for hiding this comment

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

Let's unblock the engines.

@SevInf SevInf merged commit 6eec160 into main May 10, 2024
203 of 205 checks passed
@SevInf SevInf deleted the rev-rust-1.77 branch May 10, 2024 15:22
Copy link
Contributor

✅ WASM query-engine performance won't change substantially (1.007x)

Full benchmark report
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/bench?schema=imdb_bench&sslmode=disable" \
node --experimental-wasm-modules query-engine/driver-adapters/executor/dist/bench.mjs
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
cpu: AMD EPYC 7763 64-Core Processor
runtime: node v18.20.2 (x64-linux)

benchmark                   time (avg)             (min … max)       p75       p99      p999
-------------------------------------------------------------- -----------------------------
• movies.findMany() (all - ~50K)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     376 ms/iter       (373 ms … 384 ms)    377 ms    384 ms    384 ms
Web Assembly: Latest       456 ms/iter       (455 ms … 461 ms)    456 ms    461 ms    461 ms
Web Assembly: Current      457 ms/iter       (454 ms … 462 ms)    461 ms    462 ms    462 ms
Node API: Current          197 ms/iter       (195 ms … 200 ms)    199 ms    200 ms    200 ms

summary for movies.findMany() (all - ~50K)
  Web Assembly: Current
   2.32x slower than Node API: Current
   1.22x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

• movies.findMany({ take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  15'024 µs/iter (14'477 µs … 17'583 µs) 15'096 µs 17'583 µs 17'583 µs
Web Assembly: Latest    18'556 µs/iter (17'984 µs … 21'117 µs) 18'707 µs 21'117 µs 21'117 µs
Web Assembly: Current   18'600 µs/iter (18'335 µs … 19'655 µs) 18'666 µs 19'655 µs 19'655 µs
Node API: Current        8'184 µs/iter   (8'003 µs … 8'536 µs)  8'272 µs  8'536 µs  8'536 µs

summary for movies.findMany({ take: 2000 })
  Web Assembly: Current
   2.27x slower than Node API: Current
   1.24x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

• movies.findMany({ where: {...}, take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   2'388 µs/iter   (2'215 µs … 3'561 µs)  2'343 µs  3'478 µs  3'561 µs
Web Assembly: Latest     2'867 µs/iter   (2'765 µs … 3'766 µs)  2'853 µs  3'454 µs  3'766 µs
Web Assembly: Current    2'928 µs/iter   (2'770 µs … 5'042 µs)  2'871 µs  4'383 µs  5'042 µs
Node API: Current        1'427 µs/iter   (1'317 µs … 1'883 µs)  1'430 µs  1'793 µs  1'883 µs

summary for movies.findMany({ where: {...}, take: 2000 })
  Web Assembly: Current
   2.05x slower than Node API: Current
   1.23x slower than Web Assembly: Baseline
   1.02x slower than Web Assembly: Latest

• movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     569 ms/iter       (563 ms … 587 ms)    572 ms    587 ms    587 ms
Web Assembly: Latest       778 ms/iter       (771 ms … 790 ms)    779 ms    790 ms    790 ms
Web Assembly: Current      779 ms/iter       (774 ms … 789 ms)    782 ms    789 ms    789 ms
Node API: Current          481 ms/iter       (465 ms … 507 ms)    486 ms    507 ms    507 ms

summary for movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
  Web Assembly: Current
   1.62x slower than Node API: Current
   1.37x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

• movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  81'251 µs/iter (78'646 µs … 88'523 µs) 84'720 µs 88'523 µs 88'523 µs
Web Assembly: Latest       109 ms/iter       (109 ms … 109 ms)    109 ms    109 ms    109 ms
Web Assembly: Current      110 ms/iter       (110 ms … 111 ms)    111 ms    111 ms    111 ms
Node API: Current       62'826 µs/iter (61'337 µs … 64'241 µs) 63'561 µs 64'241 µs 64'241 µs

summary for movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
  Web Assembly: Current
   1.76x slower than Node API: Current
   1.36x slower than Web Assembly: Baseline
   1.01x slower than Web Assembly: Latest

• movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     999 ms/iter     (996 ms … 1'005 ms)  1'003 ms  1'005 ms  1'005 ms
Web Assembly: Latest     1'296 ms/iter   (1'287 ms … 1'321 ms)  1'299 ms  1'321 ms  1'321 ms
Web Assembly: Current    1'312 ms/iter   (1'296 ms … 1'333 ms)  1'332 ms  1'333 ms  1'333 ms
Node API: Current          881 ms/iter       (868 ms … 895 ms)    893 ms    895 ms    895 ms

summary for movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
  Web Assembly: Current
   1.49x slower than Node API: Current
   1.31x slower than Web Assembly: Baseline
   1.01x slower than Web Assembly: Latest

• movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     143 ms/iter       (142 ms … 144 ms)    143 ms    144 ms    144 ms
Web Assembly: Latest       184 ms/iter       (183 ms … 187 ms)    184 ms    187 ms    187 ms
Web Assembly: Current      184 ms/iter       (183 ms … 185 ms)    185 ms    185 ms    185 ms
Node API: Current          108 ms/iter       (107 ms … 111 ms)    110 ms    111 ms    111 ms

summary for movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
  Web Assembly: Current
   1.69x slower than Node API: Current
   1.28x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

• movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'040 µs/iter     (976 µs … 1'742 µs)  1'034 µs  1'582 µs  1'742 µs
Web Assembly: Latest     1'374 µs/iter   (1'315 µs … 1'897 µs)  1'372 µs  1'777 µs  1'897 µs
Web Assembly: Current    1'399 µs/iter   (1'328 µs … 2'299 µs)  1'389 µs  1'963 µs  2'299 µs
Node API: Current          738 µs/iter     (702 µs … 1'194 µs)    741 µs    928 µs  1'194 µs

summary for movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
  Web Assembly: Current
   1.9x slower than Node API: Current
   1.35x slower than Web Assembly: Baseline
   1.02x slower than Web Assembly: Latest

• movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'065 µs/iter   (1'009 µs … 1'818 µs)  1'058 µs  1'516 µs  1'818 µs
Web Assembly: Latest     1'363 µs/iter   (1'304 µs … 2'038 µs)  1'366 µs  1'742 µs  2'038 µs
Web Assembly: Current    1'375 µs/iter   (1'318 µs … 2'002 µs)  1'377 µs  1'730 µs  2'002 µs
Node API: Current          785 µs/iter     (717 µs … 1'102 µs)    802 µs    957 µs  1'102 µs

summary for movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
  Web Assembly: Current
   1.75x slower than Node API: Current
   1.29x slower than Web Assembly: Baseline
   1.01x slower than Web Assembly: Latest

After changes in ac5af1b

aqrln added a commit that referenced this pull request May 10, 2024
SevInf pushed a commit that referenced this pull request May 13, 2024
* nix: update flake

* deps: update wasm-bindgen to 0.2.92

* ci: update wasm-bindgen binary to 0.2.92

* Revert "Revert rust 1.78 update (#4865)"

This reverts commit 6eec160.
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.

None yet

2 participants