Avatar for the prisma user
prisma
prisma
BlogDocsChangelog

perf(get-platform): Optimize some of the platform detection routines

#18638Merged
Comparing
integration/opt-openssl-search
(
927d472
) with
main
(
906d265
)
CodSpeed Performance Gauge
-24%
Improvements
1
Regressions
1
Untouched
1
New
0
Dropped
0
Ignored
0

Benchmarks

Failed

typescript compilation ~50 ModelsRegression
packages/client/src/__tests__/benchmarks/huge-schema/huge-schema.bench.ts::typescript::typescript compilation ~50 Models
CodSpeed Performance Gauge
-24%
9.8 ms
12.9 ms

Improved

client generation 100 models with relations
packages/client/src/__tests__/benchmarks/lots-of-relations/lots-of-relations.bench.ts::typescript::client generation 100 models with relations
CodSpeed Performance Gauge
+46%
11.7 s
8 s

Passed

client generation ~50 Models
packages/client/src/__tests__/benchmarks/huge-schema/huge-schema.bench.ts::typescript::client generation ~50 Models
CodSpeed Performance Gauge
-12%
1.1 s
1.3 s

Commits

Click on a commit to change the comparison range
Base
main
906d265
-32%
perf(get-platform): Optimize some of the platform detection routines 1. Detect node support using `process.arch` rather than calling `getos`, that will re-do openssl search 2. Look for openssl lib using readdir rather than launching child process and quit on the first found library, rather then continuing executing commands. Together, those changes improve loading peroformance by 10-20ms on orm comparison benchmarks.
b3cc436
2 years ago
by SevInf
+8%
Use `os.machine` if available
927d472
2 years ago
by SevInf
© 2025 CodSpeed Technology
Home Terms Privacy Docs