4 ms·
Parts of Bazel are written in C/C++. The command line client as well as some low level file utilities. But Bazel is distributed as a standalone package in sev
by paulddraper 7y ago
Parts of Bazel are written in C/C++.
The command line client as well as some low level file utilities.
But Bazel is distributed as a standalone package in several packaging systems; no need to install Java yourself.
Though I doubt many people know this; there's virtually no reason you would be exposed to its language implementation choices.
EDIT: Actually I believe Bazel is changing its .deb package to not be standalone, in order to comply with Debian requirements.
- bradfitz 7y ago> there's virtually no reason you would be exposed to its language implementation choices Um, doesn't it still have a client that starts up a persistent server and you then have to wait for that server to start up (which, being Java, takes forever) and then deal with those server processes hanging around? That sounds like being exposed to its language implementation choices. As opposed to, say, having fast start-up times and not using a server design like basically every other build too. But my information might be out of date. That's what always soured me on it previously, though.
- paulddraper 7y agoBazel doesn't start a server for Java JIT reasons. It starts a server for (1) concurrency control (2) management of worker processes some languages use (3) caching the build graph (recall that Bazel works with very large code bases). These reasons are independent of implementation in C++, Go, Rust, Java AOT, etc. (And yes it doesn't have to use a persistent process to solve these problems. That is the solution it chooses.) > not using a server design like basically every other build too Buck, Pants, sbt, Gradle
- RcouF1uZ4gsC 7y ago> (And yes it doesn't have to use a persistent process to solve these problems. That is the solution it chooses.) How much did the fact that Java is very slow starting up influence the decision to use a persistent process instead of some other solution?
- paulddraper 7y agoIDK. I do know that Go wasn't an option :) (Because it didn't exist)
- cromwellian 7y agoJava starts up in ~1s, something like Graal could make this faster. But I find this Java criticism more a symptom of Java-derangement syndrome, because python and node build systems have even worse startup times and no one says anything.
- pjmlp 7y agoIndeed, but it isn't a cool toy among this crowd.
- 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
- 7y ago
- sayrer 7y agoDoes the initial startup time matter? I think the server is kept around for a number of reasons that have nothing to do with Java startup time. Probably the biggest one is file-watching, using inotify, FSEvents, etc. https://stackoverflow.com/questions/57982028/how-does-bazel-track-files-so-quickly https://stackoverflow.com/questions/57982028/how-does-bazel-...
- brown9-2 7y agoThe server shuts itself down after some idle time, I’ve never had to actively manage any instances of it.