3 ms·
> python and node build systems have even worse startup times and no one says anything. Noop build with Waf (build system written in Python) takes 0.13s on my
by jhasse 7y ago
> python and node build systems have even worse startup times and no one says anything.
Noop build with Waf (build system written in Python) takes 0.13s on my system. Waf reports that the build actually takes 0.04s, so I guess 0.09s is Python's start-up time (and some other overhead).
- Liquid_Fire 7y ago> so I guess 0.09s is Python's start-up time (and some other overhead) That is probably mostly Waf startup time. Python itself starts way faster than that (on the order of 10-20ms on my machine).
- paulddraper 7y agoStartup time in any interpreted language is very quickly simply proportional to the amount of code loaded. time python -c '' # 0.024s time python -c 'import argparse' # 0.036s time python -c 'import argparse, json' # 0.040s time python -c 'import argparse, json, httplib' # 0.065s
- cromwellian 7y agoJava Hello World takes 0.132s on my Macbook pro. If I turn on -Xshare:on to use class data sharing, then it drops to 0.119s. Ergo, Java startup time is non-factor. Graal could make this even quicker, for example, a GraalVM AOT helloworld can be reduced to .008s startup, see https://github.com/graalvm/graalvm-demos/tree/master/java-kotlin-aot https://github.com/graalvm/graalvm-demos/tree/master/java-ko... for example. "time bazel" returns 0.098s Running a null build took 0.84s, but Bazel does significantly more work, as it's working on a big monorepo, as both a build tool and a package manager. In short, it is not a problem. But I've had npm take many many seconds for simple operations. "npm list" takes 2.9 seconds. Python can be slow, depending on the tool. Waf sounds like it is simple and fast, but there are lots of other examples of slow python frameworks out there.
- cma 7y ago> "time bazel" returns 0.098s For me it returns 1.6s on first run, .9s on second (bazel 0.29.1).
- cma 7y ago$ time (echo 'quit()' | python) real 0m0.025s user 0m0.000s sys 0m0.031s $ time (echo 'quit()' | python3) real 0m0.036s user 0m0.031s sys 0m0.016s (both are after it was already cached)
- paulddraper 7y agoHuh; I see < 0.15s.