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(fmt): cleanup text_document_completion #4837

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Druue
Copy link
Contributor

@Druue Druue commented Apr 24, 2024

No description provided.

@Druue Druue added this to the 5.14.0 milestone Apr 24, 2024
@Druue Druue requested a review from a team as a code owner April 24, 2024 10:10
@Druue Druue requested review from jkomyno and removed request for a team April 24, 2024 10:10
Copy link
Contributor

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.130MiB 2.130MiB 0.000B
Postgres (gzip) 838.792KiB 838.792KiB 0.000B
Mysql 2.098MiB 2.098MiB 0.000B
Mysql (gzip) 825.527KiB 825.527KiB 0.000B
Sqlite 1.991MiB 1.991MiB 0.000B
Sqlite (gzip) 785.919KiB 785.919KiB 0.000B

Copy link

codspeed-hq bot commented Apr 29, 2024

CodSpeed Performance Report

Merging #4837 will not alter performance

Comparing refactor/completions (8aa631a) with main (461fac7)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

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

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     378 ms/iter       (374 ms … 385 ms)    381 ms    385 ms    385 ms
Web Assembly: Latest       463 ms/iter       (459 ms … 468 ms)    468 ms    468 ms    468 ms
Web Assembly: Current      453 ms/iter       (448 ms … 460 ms)    456 ms    460 ms    460 ms
Node API: Current          197 ms/iter       (192 ms … 203 ms)    199 ms    203 ms    203 ms

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

• movies.findMany({ take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  15'175 µs/iter (14'697 µs … 18'111 µs) 15'288 µs 18'111 µs 18'111 µs
Web Assembly: Latest    18'693 µs/iter (18'358 µs … 20'917 µs) 18'792 µs 20'917 µs 20'917 µs
Web Assembly: Current   18'457 µs/iter (18'169 µs … 19'730 µs) 18'514 µs 19'730 µs 19'730 µs
Node API: Current        8'047 µs/iter   (7'772 µs … 8'669 µs)  8'061 µs  8'669 µs  8'669 µs

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

• movies.findMany({ where: {...}, take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   2'322 µs/iter   (2'210 µs … 3'725 µs)  2'309 µs  3'400 µs  3'725 µs
Web Assembly: Latest     2'902 µs/iter   (2'792 µs … 3'635 µs)  2'896 µs  3'573 µs  3'635 µs
Web Assembly: Current    3'068 µs/iter   (2'749 µs … 5'290 µs)  2'957 µs  5'273 µs  5'290 µs
Node API: Current        1'452 µs/iter   (1'323 µs … 1'830 µs)  1'474 µs  1'736 µs  1'830 µs

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

• movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     577 ms/iter       (566 ms … 596 ms)    582 ms    596 ms    596 ms
Web Assembly: Latest       790 ms/iter       (781 ms … 807 ms)    805 ms    807 ms    807 ms
Web Assembly: Current      790 ms/iter       (785 ms … 803 ms)    790 ms    803 ms    803 ms
Node API: Current          479 ms/iter       (463 ms … 511 ms)    490 ms    511 ms    511 ms

summary for movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
  Web Assembly: Current
   1.65x 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  79'078 µs/iter (78'390 µs … 81'129 µs) 79'800 µs 81'129 µs 81'129 µs
Web Assembly: Latest       110 ms/iter       (110 ms … 112 ms)    111 ms    112 ms    112 ms
Web Assembly: Current      112 ms/iter       (110 ms … 114 ms)    114 ms    114 ms    114 ms
Node API: Current       62'566 µs/iter (61'715 µs … 63'733 µs) 63'094 µs 63'733 µs 63'733 µs

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

• movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'011 ms/iter   (1'004 ms … 1'033 ms)  1'022 ms  1'033 ms  1'033 ms
Web Assembly: Latest     1'318 ms/iter   (1'313 ms … 1'326 ms)  1'323 ms  1'326 ms  1'326 ms
Web Assembly: Current    1'314 ms/iter   (1'300 ms … 1'334 ms)  1'327 ms  1'334 ms  1'334 ms
Node API: Current          879 ms/iter       (855 ms … 915 ms)    905 ms    915 ms    915 ms

summary for movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
  Web Assembly: Current
   1.49x 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     144 ms/iter       (142 ms … 146 ms)    144 ms    146 ms    146 ms
Web Assembly: Latest       185 ms/iter       (184 ms … 187 ms)    186 ms    187 ms    187 ms
Web Assembly: Current      185 ms/iter       (184 ms … 188 ms)    185 ms    188 ms    188 ms
Node API: Current          108 ms/iter       (106 ms … 109 ms)    109 ms    109 ms    109 ms

summary for movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
  Web Assembly: Current
   1.72x slower than Node API: Current
   1.29x 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'050 µs/iter     (978 µs … 1'781 µs)  1'042 µs  1'636 µs  1'781 µs
Web Assembly: Latest     1'362 µs/iter   (1'301 µs … 1'883 µs)  1'366 µs  1'810 µs  1'883 µs
Web Assembly: Current    1'377 µs/iter   (1'297 µs … 2'173 µs)  1'367 µs  1'962 µs  2'173 µs
Node API: Current          777 µs/iter     (713 µs … 1'211 µs)    806 µs    872 µs  1'211 µs

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

• movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'063 µs/iter   (1'014 µs … 1'742 µs)  1'065 µs  1'448 µs  1'742 µs
Web Assembly: Latest     1'365 µs/iter   (1'311 µs … 2'258 µs)  1'370 µs  1'801 µs  2'258 µs
Web Assembly: Current    1'379 µs/iter   (1'307 µs … 2'035 µs)  1'398 µs  1'735 µs  2'035 µs
Node API: Current          758 µs/iter     (707 µs … 1'147 µs)    776 µs    966 µs  1'147 µs

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

After changes in 8aa631a

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