For (incremental) loading performance I want to split a huge (believe me), generated BUILD.bazel
into smaller .bzl
files.
In each .bzl
I then plan to have a Macro foo
, which contains the actual rule calls:
def foo():
foorule("a")
foorule("b")
...
In the BUILD.bazel
I then would have (a lot of) loads like:
load("foo.bzl", foo_0 = "foo")
load("other/foo.bzl", foo_1 = "foo")
...
and then trigger the rules in BUILD.bazel
via:
foo_0()
foo_1()
Is this supposed to be faster than evaluating all rules inside of a symbol in .bzl
?
foo = [
foorule("a"),
foorule("b"),
]
Or is there even a better way to load all the info in parallel?