Skip to content

assets: hashing does not have any (debug) output #23831

Open
@mrgrain

Description

@mrgrain

Describe the feature

Calculating the hash can be very time consuming if the source for the hash is very large. Typically this can happen when node_modules is included in the source.

Currently there is no debug information available when hashing is happening. This is very confusing when hashing takes a long time.

Use Case

As a user,
When CDK creates the asset hash for a very large source directory,
I want to see that hashing happens and how long it takes,
So that I can optimize my CDK app.

Proposed Solution

With one level of verbosity:

  • Add some debug output for every call to calculateHash at the start showing the asset name and hash type.
  • After hashing the hash should be printed and the time it took

With two levels of verbosity:

  • Print additional information on the hash configuration

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.61.1

Environment details (OS name and version, etc.)

macos

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/assetsRelated to the @aws-cdk/assets packagefeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions