jsii: release 1.15.0 makes cdk synth radically slow

🐛 Bug Report

Affected Languages

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

General Information

  • JSII Version: 1.15.1
  • Platform: Python
sh-4.2# uname -a
Linux 454d0ce8e2e4 5.4.39-linuxkit #1 SMP Fri May 8 23:03:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
sh-4.2# python3 -V -V
Python 3.7.9 (default, Aug 27 2020, 21:59:41)
[GCC 7.3.1 20180712 (Red Hat 7.3.1-9)]

What is the problem?

When upgrading to pip3 install --upgrade jsii==1.15.0 the synthesis with CDK up to 10 times slower. Some of our pipeline jobs take now 80 minutes instead of 8.

We have a complex app.py with loads of stacks and also loads of lookups to the AWS account during synthesis. Normally it takes “only” 10 seconds to synthesize the CFN scripts. However as often as I switch between jsii==1.14.1 and jsii==1.15.0 I get the same result, that the synthesis takes much much longer. This is independent from the AWS version I use (client and library).

sh-4.2# date && python3 app.py && date
Fri Nov 27 09:29:22 UTC 2020
Fri Nov 27 09:29:32 UTC 2020
sh-4.2# pip3 install --upgrade jsii
...
      Successfully uninstalled jsii-1.14.1
Successfully installed jsii-1.15.0
sh-4.2# date && python3 app.py && date
Fri Nov 27 09:29:52 UTC 2020
Fri Nov 27 09:31:54 UTC 2020

Verbose Log

Because of privacy reasons I dont want to provide verbose logs. However I made a diff of both verbose logs before and after upgrading to jsii==1.15.1 and there were just a couple and no spectacular differences:

  • modules workdir
    • before: /tmp/jsii-kernel-7tSAAx
    • after: /tmp/jsii-kernel-WXbuZ8
  • the cdk.out*-directory

Both log files are of same length and same content, except the module wordir and the cdk out dir.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I can confirm that the patch resolved the performance issue in our Python CDK project.

@slotnick thank you for confirming! I’ll get this merged & released as soon as possible then!

Just confirming that we are seeing much slower behavior with 1.15.0–our deployment process went from 1 hour to 1.5 hours, a 50% increase. Would greatly appreciate a speedy resolution.

Witnessing similar behavior in a java-cdk project:

node -p process.versions
{
  node: '12.18.0',
  v8: '7.8.279.23-node.37',
  uv: '1.37.0',
  zlib: '1.2.11',
  brotli: '1.0.7',
  ares: '1.16.0',
  modules: '72',
  nghttp2: '1.41.0',
  napi: '6',
  llhttp: '2.0.4',
  http_parser: '2.9.3',
  openssl: '1.1.1g',
  cldr: '37.0',
  icu: '67.1',
  tz: '2019c',
  unicode: '13.0'
}

It’s running so slowly that I was convinced it was hanging or that I was offline for some reason.