You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran some numbers, which is how I settled on using unpkg.com, as some packges are absolutely huuuuge (looking at you @typescript-eslint/eslint-plugin ~ 75MB)
Parsing an object with the following shape is quite expensive:
interfacePackage{name: string;versions: Record<string,{name: string;dependencies: Record<string,string>;/* etc. */}>}
cpu: Apple M1 Max
runtime: deno 1.29.4 (aarch64-apple-darwin)
file:///Users/max_duval/Code/deno-playground/actions-npm-dependencies/src/registry.bench.ts
benchmark time (avg) (min … max) p75 p99 p995
------------------------------------------------------------------- -----------------------------
Parsing versions natively 95.97 µs/iter (77.92 µs … 1.07 ms) 102.46 µs 143.08 µs 162.62 µs
Parsing versions as unknown 324.37 µs/iter (298.62 µs … 732.83 µs) 319.04 µs 634.83 µs 652.12 µs
Parsing versions as package 1.86 ms/iter (1.78 ms … 2.42 ms) 1.86 ms 2.22 ms 2.33 ms
Accessing package.json for specific versions on unpkg is a lot faster:
I ran some numbers, which is how I settled on using
unpkg.com
, as some packges are absolutely huuuuge (looking at you@typescript-eslint/eslint-plugin
~ 75MB)Parsing an object with the following shape is quite expensive:
Accessing
package.json
for specific versions on unpkg is a lot faster:The text was updated successfully, but these errors were encountered: