Giter Site home page Giter Site logo

How to enable remote execution with language servers for `TypeScriptCompile` and `AngularTemplateCompile` actions about angular-bazel-example HOT 3 CLOSED

qzmfranklin avatar qzmfranklin commented on May 19, 2024
How to enable remote execution with language servers for `TypeScriptCompile` and `AngularTemplateCompile` actions

from angular-bazel-example.

Comments (3)

alexeagle avatar alexeagle commented on May 19, 2024

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.

qzmfranklin avatar qzmfranklin commented on May 19, 2024

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.

alexeagle avatar alexeagle commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.