Skip to content

(aws-cdk-lib): improve loading time for monopackage library #18036

@rix0rrr

Description

@rix0rrr

The loading time of the aws-cdk-lib library is quite bad, encouraging import styles that will avoid loading the entire library (or saddling people who don't know JS very well with poor performance).

2 things we should be doing to the aws-cdk-lib build:

  • Bundle and minify each submodule, to reduce the amount of files loaded and amount of characters scanned
    • The above will only help node runtime performance, not tsc compilation performance. We would need to do the same to the .d.ts files in order to help the TypeScript compiler along as well.
  • Extract sourcemaps out into their own files
    • This will reduce amount of bytes scanned on each load operation
    • This probably doesn't require an action: it will probably come for free from doing the previous step

Framework Version

2

Metadata

Metadata

Assignees

No one assigned

    Labels

    aws-cdk-libRelated to the aws-cdk-lib packageclosed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.effort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions