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 "fix(quaint/DA): handle JSON parsing engines side so that we can correctly handle i64s (#4883)" #4886

Merged
merged 1 commit into from
May 24, 2024

Conversation

SevInf
Copy link
Contributor

@SevInf SevInf commented May 24, 2024

This reverts commit f742678.

Temporary reverting the change. It is interdependent with
prisma/prisma#24269 and neither PR works correctly without the other.
The plan was to let engines CI to temporarily go red and fix it
immediately by merging client PR. However, engine release pipeline is
broken for unrelated reason and this is not possible. Just to limit
amount of broken things in progress, we are reverting original PR. It is
expected we restore it with no changes once release pipeline is fixed.

…an correctly handle `i64`s (#4883)"

This reverts commit f742678.

Temporary reverting the change. It is interdependent with
prisma/prisma#24269 and neither PR works correctly without the other.
The plan was to let engines CI to temporarily go red and fix it
immediately by merging client PR. However, engine release pipeline is
broken for unrelated reason and this is not possible. Just to limit
amount of broken things in progress, we are reverting original PR. It is
expected we restore it with no changes once release pipeline is fixed.
@SevInf SevInf requested a review from a team as a code owner May 24, 2024 15:49
@SevInf SevInf added this to the 5.15.0 milestone May 24, 2024
@SevInf SevInf requested review from laplab and removed request for a team May 24, 2024 15:49
Copy link

codspeed-hq bot commented May 24, 2024

CodSpeed Performance Report

Merging #4886 will not alter performance

Comparing revert-4883 (4cc52b0) with main (417c14e)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.153MiB 2.153MiB -387.000B
Postgres (gzip) 846.060KiB 846.088KiB -29.000B
Mysql 2.119MiB 2.120MiB -386.000B
Mysql (gzip) 831.749KiB 831.837KiB -91.000B
Sqlite 2.015MiB 2.015MiB -183.000B
Sqlite (gzip) 793.080KiB 793.162KiB -84.000B

@SevInf SevInf merged commit 793f7fb into main May 24, 2024
181 of 182 checks passed
@SevInf SevInf deleted the revert-4883 branch May 24, 2024 16:02
Copy link
Contributor

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

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     362 ms/iter       (360 ms … 363 ms)    363 ms    363 ms    363 ms
Web Assembly: Latest       452 ms/iter       (449 ms … 458 ms)    455 ms    458 ms    458 ms
Web Assembly: Current      453 ms/iter       (451 ms … 460 ms)    458 ms    460 ms    460 ms
Node API: Current          196 ms/iter       (192 ms … 200 ms)    197 ms    200 ms    200 ms

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

• movies.findMany({ take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  14'806 µs/iter (14'378 µs … 17'418 µs) 14'553 µs 17'418 µs 17'418 µs
Web Assembly: Latest    18'650 µs/iter (18'109 µs … 21'099 µs) 18'732 µs 21'099 µs 21'099 µs
Web Assembly: Current   18'657 µs/iter (18'452 µs … 20'321 µs) 18'629 µs 20'321 µs 20'321 µs
Node API: Current        8'146 µs/iter  (7'866 µs … 11'476 µs)  8'109 µs 11'476 µs 11'476 µs

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

• movies.findMany({ where: {...}, take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   2'320 µs/iter   (2'200 µs … 3'842 µs)  2'293 µs  3'443 µs  3'842 µs
Web Assembly: Latest     2'879 µs/iter   (2'771 µs … 3'573 µs)  2'865 µs  3'442 µs  3'573 µs
Web Assembly: Current    2'891 µs/iter   (2'785 µs … 4'727 µs)  2'886 µs  3'468 µs  4'727 µs
Node API: Current        1'380 µs/iter   (1'296 µs … 1'751 µs)  1'394 µs  1'604 µs  1'751 µs

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

• movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     578 ms/iter       (569 ms … 594 ms)    588 ms    594 ms    594 ms
Web Assembly: Latest       777 ms/iter       (770 ms … 793 ms)    782 ms    793 ms    793 ms
Web Assembly: Current      773 ms/iter       (765 ms … 792 ms)    776 ms    792 ms    792 ms
Node API: Current          473 ms/iter       (465 ms … 495 ms)    474 ms    495 ms    495 ms

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

• movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  79'028 µs/iter (78'701 µs … 79'772 µs) 79'254 µs 79'772 µs 79'772 µs
Web Assembly: Latest       109 ms/iter       (109 ms … 110 ms)    110 ms    110 ms    110 ms
Web Assembly: Current      108 ms/iter       (107 ms … 108 ms)    108 ms    108 ms    108 ms
Node API: Current       60'534 µs/iter (59'975 µs … 61'320 µs) 61'049 µs 61'320 µs 61'320 µs

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

• movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'023 ms/iter   (1'012 ms … 1'041 ms)  1'036 ms  1'041 ms  1'041 ms
Web Assembly: Latest     1'300 ms/iter   (1'287 ms … 1'310 ms)  1'310 ms  1'310 ms  1'310 ms
Web Assembly: Current    1'288 ms/iter   (1'283 ms … 1'304 ms)  1'293 ms  1'304 ms  1'304 ms
Node API: Current          865 ms/iter       (830 ms … 894 ms)    893 ms    894 ms    894 ms

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

• movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     146 ms/iter       (144 ms … 148 ms)    147 ms    148 ms    148 ms
Web Assembly: Latest       180 ms/iter       (179 ms … 182 ms)    182 ms    182 ms    182 ms
Web Assembly: Current      181 ms/iter       (181 ms … 182 ms)    182 ms    182 ms    182 ms
Node API: Current          106 ms/iter       (104 ms … 108 ms)    107 ms    108 ms    108 ms

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

• movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'053 µs/iter   (1'003 µs … 1'788 µs)  1'052 µs  1'599 µs  1'788 µs
Web Assembly: Latest     1'384 µs/iter   (1'326 µs … 2'035 µs)  1'384 µs  1'770 µs  2'035 µs
Web Assembly: Current    1'430 µs/iter   (1'342 µs … 2'401 µs)  1'413 µs  2'186 µs  2'401 µs
Node API: Current          746 µs/iter     (693 µs … 1'016 µs)    764 µs    886 µs  1'016 µs

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

• movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'018 µs/iter     (982 µs … 1'551 µs)  1'024 µs  1'410 µs  1'551 µs
Web Assembly: Latest     1'389 µs/iter   (1'302 µs … 2'300 µs)  1'362 µs  2'253 µs  2'300 µs
Web Assembly: Current    1'380 µs/iter   (1'322 µs … 2'022 µs)  1'383 µs  1'754 µs  2'022 µs
Node API: Current          793 µs/iter     (710 µs … 1'071 µs)    812 µs    859 µs  1'071 µs

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

After changes in 4cc52b0

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