Specifying Folders In buf generate --path
Arguments Causes Massive Performance Hit
#2713
Labels
Cleanup
Cleanup tasks
Hi, I've been chatting through this problem on the buf slack in a thread here. I've been discussing it with @jhump for the most part.
The problem is arising when we're calling
buf generate
with a folder in the--path
arguments versus calling it with files in the--path
arguments.In simple terms:
A)
buf generate --config=buf.yaml --path=/foo/bar/directory
takes ~1 minute to generate.ts
files for 11.proto
files nested in that directory.B)
buf generate --config=buf.yaml --path=/foo/bar/directory/file1.proto,/foo/bar/directory/file2.proto,...
takes <1 second to generated .ts files for 11.proto
files nested in the same directory.The root folder we're calling
buf generate
from is a very large monorepo with hundreds of thousands of files. If we do not recursively expand all.proto
files and inject them into that one--path
argument (or specify them as 11 separate--path
arugments),buf generate
becomes 60+x slower.If I can provide any more context let me know. I verified this by running
buf generate
a bunch of different times without expanding the files and specifying the folder to make sure it's the folder that's causing it.The text was updated successfully, but these errors were encountered: