jsii: release 1.15.0 makes cdk synth radically slow
🐛 Bug Report
Affected Languages
-
TypeScript
orJavascript
-
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
- fix(runtime): excessive latency introduced by sleep When recovering from `EAGAIN`, the `@jsii/runtime` recently added a synchronous sleep for 50 milliseconds. However in large and complex application... — committed to aws/jsii by RomainMuller 4 years ago
- fix(runtime): excessive latency introduced by sleep (#2298) When recovering from `EAGAIN`, the `@jsii/runtime` recently added a synchronous sleep for 50 milliseconds. However in large and complex a... — committed to aws/jsii by RomainMuller 4 years ago
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:
It’s running so slowly that I was convinced it was hanging or that I was offline for some reason.
The delta between both releases is:
v1.14.1...v1.15.0
.If I were to throw a wild guess at which changes could cause the performance issues:
sleep
that was introduced when recovering fromEAGAIN