Comments (3)
This is a great question, I have struggled with it also. The right tuning depends on the incrementality of the build - if only a small number of ts_library actions need to run, it's generally faster to do this locally because you have warm workers. But if you have a massive cache miss, and also a wide enough graph of ts_library, then there may be some of them which are queued for local worker pool so it would be faster to go remote.
Bazel has an experimental strategy to race local and remote and take the faster one, but this doesn't also allow workers to be used.
Remote compilations are over a big farm, and don't have affinity for the same worker over multiple requests, so it wouldn't make much sense to have a remote worker - it would always have a cold cache. (The time to bring up a tsc process, parse typescript.js, and JIT it is probably lower than the variable cost of compiling your sources)
/cc @gpounder
from angular-bazel-example.
Thanks @alexeagle for the explanation!
Agree on your comment that remote workers don't make much sense due to lack of affinities. I did not think of that earlier.
The race strategy sounds interesting. I'd certainly like to give it a shot if it comes out.
from angular-bazel-example.
The race strategy is --experimental_spawn_strategy
so you can give it a try, but the RBE team says it has some bugs so beware!
from angular-bazel-example.
Related Issues (20)
- Remove need for rxjs_shims HOT 2
- breakage on latest master? HOT 2
- node option about rollup_bundle
- What is the current state of Converting an Angular CLI workspace? HOT 1
- Question: index.html and injected js HOT 3
- Question: Debugging on upgrade HOT 2
- question: Experimental Support for Ivy in Bazel? HOT 2
- cannot be named without a reference to '../../external/npm/node_modules/@angular/animations/animations' HOT 3
- Service Worker HOT 3
- Remove ngfactory deps HOT 4
- Multiple Node Projects Single WORKSPACE FILE HOT 8
- Already install @bazel/ibazel but still not running on window HOT 4
- Cannot find nodejs when running bazel run //src:devserver HOT 2
- Cannot import with module_name only with path HOT 1
- cannot import with path mappings from tsconfig.json HOT 3
- Bazel + Ivy (--define=compile=aot) fails with TS-966002 HOT 5
- Using Bazel in Application using Library HOT 1
- importHelpers breaks ng test HOT 1
- Bazel errors when building targets with rxjs deps HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-bazel-example.