Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jsii-reflect): don't load same assembly multiple times #461

Merged
merged 5 commits into from
Apr 16, 2019

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Apr 16, 2019

deCDK tests were calling loadModule() for every package.
loadModule() did have some recursion avoidance INSIDE one call,
but not across multiple load calls on the same type system.

This brings down the deCDK tests from 80s to 10s.

Add an option to disable validation, which would bring the full CDK
typesystem loading down from 10s to 600ms (validation is enabled
by default).

Some more type exposure updates so that we can update awslint
and friends in the CDK repository to take advantage of the new
jsii model.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

deCDK tests were calling `loadModule()` for every package.
`loadModule()` did have some recursion avoidance INSIDE one call,
but not across multiple load calls on the same type system.

This brings down the deCDK tests from 80s to 10s.

Add an option to disable validation, which would bring the full CDK
typesystem loading down from 10s to 600ms (validation is enabled
by default).

Some more type exposure updates so that we can update awslint
and friends in the CDK repository to take advantage of the new
jsii model.
@rix0rrr rix0rrr requested a review from a team as a code owner April 16, 2019 12:01
*/
public async load(fileOrDirectory: string) {
public async load(fileOrDirectory: string, validate = true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer keyword arguments: { validate: true }

@rix0rrr rix0rrr merged commit 3a6b21c into master Apr 16, 2019
@rix0rrr rix0rrr deleted the huijbers/reflect-fixes branch April 16, 2019 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants