Huge performance impact due to whiteoutLeadingComments
calls
#3091
Labels
bug
This issue is a bug.
closing-soon
This issue will automatically close in 4 days unless further comments are made.
needs-reproduction
This issue needs reproduction.
p1
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
🐛 Bug Report
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)Go
(possibly others as well)
General Information
What is the problem?
Hi! I just did some CPU profiling of our
cdktf get
command as its execution time increased substantially over the course of the last months. The cause for this was probably the growing AWS Terraform provider – which can take up to an hour to build in CI nowadays.It appears that calls to
whiteoutLeadingComments
take a lot of time:I was able to confirm this locally by commenting out the body of
whiteoutLeadingComments
which brought the invocation of JSII (with Python configured) down to 90 seconds (from 1270s).Is there a way we could e.g. introduce caching for the result of
whiteoutLeadingComments
orcomputeLineStarts
to improve the performance?Reproduce
To reproduce the long build times, clone repo and run
cdktf get
.Verbose Log
The text was updated successfully, but these errors were encountered: