Determine this is the right repository
Summary of the issue
Context
Upgrading google-api-core from version 2.27.0 to 2.28.1 (and later) has caused a significant spike in CPU usage. While version 2.27.0 maintains a steady 20–40% utilization, versions 2.28.1 and above consistently reach 100% CPU consumption.
Expected Behavior:
Same consumption of CPU as in 2.27.0
Actual Behavior:
CPU consumption increased up to 5 times.
API client name and version
google-api-core v. 2.28.1 - 2.30.0
Reproduction steps: code
file: main.py
import time
import importlib
import google.api_core
time.sleep(5)
def test_api_core():
importlib.reload(google.api_core)
for _ in range(2000):
test_api_core()
print("Successfully imported 2000 times.")
Reproduction steps: supporting files
file: Dockerfile
FROM python:3
WORKDIR /app
RUN pip install --no-cache-dir google-api-core==2.28.1 grpcio
COPY main.py .
CMD ["python", "main.py"]
Reproduction steps: actual results
docker stats:
2.30.0
2.27.0
Reproduction steps: expected results
OS & version + platform
No response
Python environment
No response
Python dependencies
No response
Additional context
No response
Determine this is the right repository
Summary of the issue
Context
Upgrading google-api-core from version 2.27.0 to 2.28.1 (and later) has caused a significant spike in CPU usage. While version 2.27.0 maintains a steady 20–40% utilization, versions 2.28.1 and above consistently reach 100% CPU consumption.
Expected Behavior:
Same consumption of CPU as in 2.27.0
Actual Behavior:
CPU consumption increased up to 5 times.
API client name and version
google-api-core v. 2.28.1 - 2.30.0
Reproduction steps: code
file: main.py
Reproduction steps: supporting files
file: Dockerfile
Reproduction steps: actual results
docker stats:
2.30.0
2.27.0
Reproduction steps: expected results
OS & version + platform
No response
Python environment
No response
Python dependencies
No response
Additional context
No response