generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
Description
There is a possible performance optimization with cdk watch
: if a given change event is for a file that belongs to an Asset, we can skip synthesizing the Cloud Assembly again (we know it will be the same).
Since synthesis is actually the bottleneck for many hotswap deployments (like for Lambda, or for StepFunctions), this might be a significant performance improvement for some use cases, especially in non-NodeJS languages.
Use Case
Hotswapping of resources where cdk synthesis
is the performance bottleneck, especially in non-NodeJS languages.
Proposed Solution
The implementation of this would be quite complex. Basically, when we receive a change in cdk watch
, we have to:
- Check that it belongs to the files/directories of any Asset in any of the Stack(s) we are deploying with
watch
. - For each of those found Assets, we now have to search the template of the Stack(s) to determine which resources reference that Asset.
- For each of those resources, we now have to send them to the hotswap detectors to verify whether they support hotswapping.
- If all of them do, we can now perform hotswapping without running
cdk synth
before.
Other information
No response
Acknowledge
- I may be able to implement this feature request
- This feature might incur a breaking change
jonny-rimek, ChrisSargent, scott-mccracken, pdemagny, phlrnnr and 4 morephlrnnr, Fettah and m-arrieta-r