Skip to content

Performance impact of calling JSON.stringify in loadProtoJSON #194

@mattzeunert

Description

@mattzeunert

We're using the compute engine InstancesClient and notice that every time we create an instance of it we spend a bunch of time in JSON.stringify as it's generating a 1.4 MB object. (This is running in a .333 vCPU cloud function.)

This is the call stack:

at GrpcClient.loadProtoJSON (/workspace/node_modules/google-gax/build/src/fallback.js:117:38)
at new InstancesClient (/workspace/node_modules/@google-cloud/compute/build/src/v1/instances_client.js:149:38)

Maybe that can be optimized somehow?

Screenshot 2024-12-30 at 09 15 39

Metadata

Metadata

Assignees

No one assigned

    Labels

    size: lPull request size is large.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions