I have a BUCK file with 100s of glob-expressions and parsing takes more than 3mins.
I'm certain that I can optimize my BUCK file by refactoring and refining my globs.
However I was wondering what optimisations are already built in ?
Buck has a lot of glob implementations depending on whether watchman is available and Skylark or Python DSL is used. When Skylark is used all glob invocations are cached. If Python DSL is used only watchman-based implementation caches results.
We can certainly add caching support for Python DSL globber that is used when Watchman is not available, although I strongly recommend not using it since it's very slow.
I'd like to mention that switching from python-dsl to skylark reduced the parsing time from over 3mins to less than 3s.
this is awesome, @nikhedonia! Thanks for letting us know! Would you still like to have caching for Python DSL internal globber?
@ttsugriy depends on a couple of factors:
As parsetimes become quite painful on larger projects - this would be a nice to have.
We are also not ready to move the buckaroo ecosystem to skylark - I think we are 3 months away from that.
Most helpful comment
I'd like to mention that switching from python-dsl to skylark reduced the parsing time from over 3mins to less than 3s.