#Long `load module` step
1 messages · Page 1 of 1 (latest)
Can you please share a link to the trace? If its a private repo only dagger employees will be able to see it
You can expand that span to see more details (sorry if stating the obvious)
-link removed-
Here's a failing one because I omitted some license keys.
Maybe it's just that codegen takes a while and 30s isn't out of the ordinary?
Can you also share which SDK you are using to write the module?
typescript
Oops sorry just saw that line sdkForModule: typescript
Yeah this one takes a bit longer than go and other languages, we're working on improving this. cc @low drum
cool, not really a problem if I can get a persistent cache working in CI anyways
@low drum is there way to get Bun as the default TypeScript runtime upon dagger init --sdk typescript? I don't see any flags to set in that way.
modified: package.json
deleted: yarn.lock
+++ b/package.json
@@ -1,5 +1,8 @@
{
"type": "module",
+ "dagger": {
+ "runtime": "bun"
+ },
then dagger develop is how I do it today.
Bun is quicker and less variable on cold starts, but matters much less with warm cache for default dagger functions anyway.
+---------------------+------------------+------------------+-------------------+------------------+
| Metric | Node (Cold Start) | Bun (Cold Start) | Node (Warm Cache) | Bun (Warm Cache) |
+---------------------+------------------+------------------+-------------------+------------------+
| Mean | 33.36 | 23.90 | 1.401 | 1.295 |
| Median | 32.63 | 23.48 | 1.370 | 1.310 |
| Standard Deviation | 4.86 | 1.74 | 0.115 | 0.052 |
| Minimum | 27.46 | 21.77 | 1.290 | 1.190 |
| Maximum | 42.44 | 28.35 | 1.720 | 1.390 |
+---------------------+------------------+------------------+-------------------+------------------+
testing by removing the dagger engine and cache each time
# running in a module created with `dagger init --sdk=typescript` (node)
counter=1
while [ $counter -le 10 ]; do
docker rm -fv $(docker ps -aqf name=dagger-engine)
/usr/bin/time -a -o /tmp/noddy dagger functions
((counter++))
done
tail -f noddy
32.96 real 0.86 user 0.61 sys
34.56 real 0.85 user 0.59 sys
27.46 real 0.78 user 0.55 sys
30.88 real 0.87 user 0.63 sys
28.31 real 0.83 user 0.67 sys
40.74 real 1.10 user 0.89 sys
32.29 real 0.96 user 0.75 sys
35.63 real 0.95 user 0.71 sys
42.44 real 1.07 user 0.84 sys
28.33 real 0.81 user 0.59 sys
Warm engine+cache, not removed with Node
1.34 real 0.15 user 0.10 sys
1.29 real 0.15 user 0.11 sys
1.39 real 0.16 user 0.12 sys
1.42 real 0.15 user 0.11 sys
1.42 real 0.15 user 0.11 sys
1.33 real 0.15 user 0.11 sys
1.33 real 0.15 user 0.11 sys
1.72 real 0.17 user 0.11 sys
1.42 real 0.16 user 0.12 sys
1.35 real 0.15 user 0.11 sys
# running in a module created with `dagger init --sdk=typescript` and then above done to run Bun
counter=1
while [ $counter -le 10 ]; do
docker rm -fv $(docker ps -aqf name=dagger-engine)
/usr/bin/time -a -o /tmp/bunny dagger functions
((counter++))
done
tail -f bunny
25.10 real 0.74 user 0.56 sys
28.35 real 0.82 user 0.63 sys
23.37 real 0.72 user 0.54 sys
23.28 real 0.72 user 0.53 sys
22.84 real 0.70 user 0.52 sys
23.59 real 0.76 user 0.56 sys
24.07 real 0.74 user 0.57 sys
22.36 real 0.69 user 0.50 sys
21.77 real 0.67 user 0.52 sys
24.27 real 0.72 user 0.58 sys
warm engine+cache, not removed with Bun
1.19 real 0.13 user 0.10 sys
1.32 real 0.15 user 0.11 sys
1.39 real 0.14 user 0.10 sys
1.31 real 0.14 user 0.10 sys
1.25 real 0.14 user 0.11 sys
1.31 real 0.15 user 0.11 sys
1.31 real 0.14 user 0.10 sys
1.33 real 0.14 user 0.11 sys
1.29 real 0.14 user 0.10 sys
1.25 real 0.14 user 0.11 sys