Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Replace googleapis package with specific ones #6761

Closed
lotas opened this issue Jan 5, 2024 · 1 comment · Fixed by #6926
Closed

Chore: Replace googleapis package with specific ones #6761

lotas opened this issue Jan 5, 2024 · 1 comment · Fixed by #6926
Labels
performance Issues affecting the performance of Taskcluster or a particular micro-service

Comments

@lotas
Copy link
Contributor

lotas commented Jan 5, 2024

While debugging connections in profiler I noticed that node spends a huge amount of time loading googleapis package.

That package (as of 73.0.0) contains ~218 service that take about 84Mb. And I believe they are all being parsed and loaded on startup.

Also package docs suggest to load packages individually:

If you need to reduce startup times, you can alternatively install a submodule as its own dependency. We make an effort to publish submodules that are not in this list.

image

(measured with npx clinic flame -- node src/main.js server)

@lotas lotas added the performance Issues affecting the performance of Taskcluster or a particular micro-service label Jan 5, 2024
@lotas
Copy link
Contributor Author

lotas commented Apr 29, 2024

There are two major node.js libraries - googleapis and @google-cloud
In code, auth services uses one call and so is relatively easy to migrate, while worker-manager uses compute, iam and oauth which do not have 1:1 features in the later library, so I'll use @googleapis/compute instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issues affecting the performance of Taskcluster or a particular micro-service
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant