gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

Improve performance of code generation; each API should be less than 1 minute

Open parthea opened this issue 2 months ago • 0 comments

Generating google/cloud/dialogflow/cx is significantly longer than other APIs. This bug tracks the investigation into the performance issue.

(WIP)

Minimal protoc command

Duration: ~ 6 min (note, this took 20 minutes in a previous run. I'm still debugging)

partheniou@partheniou-vm-3:~/git/googleapis$ echo "Start Time: $(date +'%H:%M:%S')" && find google/cloud/dialogflow/cx/v3 -name '*.proto' | xargs protoc -I . -I /usr/local/google/home/partheniou/git/googleapis --python_gapic_out=temp; echo "End Time: $(date +'%H:%M:%S')"
Start Time: 14:22:42
google/cloud/dialogflow/cx/v3/advanced_settings.proto:19:1: warning: Import google/api/field_behavior.proto is unused.
google/cloud/dialogflow/cx/v3/flow.proto:30:1: warning: Import google/protobuf/struct.proto is unused.
google/cloud/dialogflow/cx/v3/environment.proto:28:1: warning: Import google/protobuf/struct.proto is unused.
google/cloud/dialogflow/cx/v3/version.proto:27:1: warning: Import google/protobuf/struct.proto is unused.
End Time: 14:28:54

Note: The expectation is that generation for a single API does not exceed 1 minute.

parthea avatar Oct 28 '25 14:10 parthea