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

chore: clean up new clippy warnings #4849

Merged
merged 4 commits into from
May 7, 2024
Merged

Conversation

laplab
Copy link
Contributor

@laplab laplab commented May 3, 2024

@laplab laplab requested a review from a team as a code owner May 3, 2024 15:37
@laplab laplab requested review from jkomyno and removed request for a team May 3, 2024 15:37
psl/schema-ast/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented May 3, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.152MiB 2.141MiB 11.285KiB
Postgres (gzip) 845.859KiB 842.649KiB 3.210KiB
Mysql 2.123MiB 2.110MiB 13.173KiB
Mysql (gzip) 832.876KiB 829.013KiB 3.864KiB
Sqlite 2.016MiB 2.003MiB 13.424KiB
Sqlite (gzip) 793.213KiB 789.712KiB 3.501KiB

Copy link

codspeed-hq bot commented May 3, 2024

CodSpeed Performance Report

Merging #4849 will degrade performances by 17.22%

Comparing chore/clippy-is-at-it-again (ef7db93) with main (133a47f)

Summary

❌ 3 regressions
✅ 8 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main chore/clippy-is-at-it-again Change
validate (large) 296.7 ms 358.4 ms -17.22%
validate (medium) 65.9 ms 77.9 ms -15.44%
validate (small) 9.4 ms 11 ms -14.86%

Copy link
Contributor

@Druue Druue left a comment

Choose a reason for hiding this comment

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

So much dead code 👀 gosh

Copy link
Contributor

github-actions bot commented May 3, 2024

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

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     296 ms/iter       (294 ms … 299 ms)    298 ms    299 ms    299 ms
Web Assembly: Latest       384 ms/iter       (383 ms … 385 ms)    385 ms    385 ms    385 ms
Web Assembly: Current      375 ms/iter       (374 ms … 377 ms)    376 ms    377 ms    377 ms
Node API: Current          200 ms/iter       (194 ms … 207 ms)    205 ms    207 ms    207 ms

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

• movies.findMany({ take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  12'054 µs/iter (11'725 µs … 14'771 µs) 11'928 µs 14'771 µs 14'771 µs
Web Assembly: Latest    16'045 µs/iter (15'512 µs … 17'125 µs) 16'185 µs 17'125 µs 17'125 µs
Web Assembly: Current   15'514 µs/iter (15'219 µs … 17'368 µs) 15'518 µs 17'368 µs 17'368 µs
Node API: Current        8'220 µs/iter  (7'924 µs … 11'339 µs)  8'207 µs 11'339 µs 11'339 µs

summary for movies.findMany({ take: 2000 })
  Web Assembly: Current
   1.89x slower than Node API: Current
   1.29x slower than Web Assembly: Baseline
   1.03x faster than Web Assembly: Latest

• movies.findMany({ where: {...}, take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'857 µs/iter   (1'753 µs … 3'028 µs)  1'841 µs  2'621 µs  3'028 µs
Web Assembly: Latest     2'445 µs/iter   (2'346 µs … 3'222 µs)  2'431 µs  3'071 µs  3'222 µs
Web Assembly: Current    2'527 µs/iter   (2'334 µs … 4'311 µs)  2'417 µs  4'223 µs  4'311 µs
Node API: Current        1'408 µs/iter   (1'312 µs … 1'759 µs)  1'415 µs  1'725 µs  1'759 µs

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

• movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     560 ms/iter       (546 ms … 578 ms)    575 ms    578 ms    578 ms
Web Assembly: Latest       757 ms/iter       (756 ms … 759 ms)    758 ms    759 ms    759 ms
Web Assembly: Current      770 ms/iter       (765 ms … 787 ms)    772 ms    787 ms    787 ms
Node API: Current          469 ms/iter       (462 ms … 483 ms)    472 ms    483 ms    483 ms

summary for movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
  Web Assembly: Current
   1.64x slower than Node API: Current
   1.38x slower than Web Assembly: Baseline
   1.02x slower than Web Assembly: Latest

• movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  76'987 µs/iter (76'466 µs … 77'588 µs) 77'314 µs 77'588 µs 77'588 µs
Web Assembly: Latest       108 ms/iter       (107 ms … 109 ms)    109 ms    109 ms    109 ms
Web Assembly: Current      108 ms/iter       (108 ms … 109 ms)    109 ms    109 ms    109 ms
Node API: Current       62'973 µs/iter (61'689 µs … 64'476 µs) 64'254 µs 64'476 µs 64'476 µs

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

• movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     979 ms/iter     (972 ms … 1'001 ms)    979 ms  1'001 ms  1'001 ms
Web Assembly: Latest     1'267 ms/iter   (1'259 ms … 1'282 ms)  1'272 ms  1'282 ms  1'282 ms
Web Assembly: Current    1'273 ms/iter   (1'265 ms … 1'290 ms)  1'278 ms  1'290 ms  1'290 ms
Node API: Current          883 ms/iter       (869 ms … 891 ms)    891 ms    891 ms    891 ms

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

• movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     142 ms/iter       (141 ms … 144 ms)    142 ms    144 ms    144 ms
Web Assembly: Latest       181 ms/iter       (179 ms … 183 ms)    182 ms    183 ms    183 ms
Web Assembly: Current      182 ms/iter       (181 ms … 184 ms)    183 ms    184 ms    184 ms
Node API: Current          112 ms/iter       (110 ms … 113 ms)    113 ms    113 ms    113 ms

summary for movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
  Web Assembly: Current
   1.62x 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     870 µs/iter     (814 µs … 1'499 µs)    870 µs  1'339 µs  1'499 µs
Web Assembly: Latest     1'218 µs/iter   (1'153 µs … 1'963 µs)  1'219 µs  1'775 µs  1'963 µs
Web Assembly: Current    1'224 µs/iter   (1'144 µs … 1'930 µs)  1'219 µs  1'829 µs  1'930 µs
Node API: Current          791 µs/iter     (738 µs … 1'501 µs)    791 µs  1'139 µs  1'501 µs

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

• movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     862 µs/iter     (820 µs … 1'465 µs)    867 µs  1'198 µs  1'465 µs
Web Assembly: Latest     1'247 µs/iter   (1'162 µs … 1'904 µs)  1'225 µs  1'866 µs  1'904 µs
Web Assembly: Current    1'203 µs/iter   (1'145 µs … 1'837 µs)  1'206 µs  1'584 µs  1'837 µs
Node API: Current          765 µs/iter     (717 µs … 1'105 µs)    779 µs    866 µs  1'105 µs

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

After changes in ef7db93

@laplab laplab added this to the 5.14.0 milestone May 6, 2024
@laplab laplab force-pushed the chore/clippy-is-at-it-again branch from 2b95fe2 to dfeaef7 Compare May 6, 2024 13:48
@Weakky Weakky merged commit b34f35d into main May 7, 2024
207 of 208 checks passed
@Weakky Weakky deleted the chore/clippy-is-at-it-again branch May 7, 2024 10:29
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.

3 participants