Skip to content

jsii-pacmak performance issues #1854

@jsteinich

Description

@jsteinich

🐛 Bug Report

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)

General Information

  • JSII Version: 1.7.0
  • Platform: Linux docker-desktop 4.19.104-microsoft-standard

What is the problem?

jsii-pacmak is quite slow when dealing with 700+ files (hashicorp/terraform-cdk#276).
After running multiple profiling sessions,

return Object.values(types);
sticks out as a hot spot (~40/60 seconds profiling window). It seems like it would be easy to cache the result of Object.values

The other spot that stood out was

jsii.validateAssembly(this.spec);

which took over 8 seconds. I see that validation was turned off in other spots (#1751), so maybe it could be turned off here as well.

Verbose Log

vscode-cpuprofile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions