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(rosetta): transliterate tries to recompile samples from tablets #3324

Merged
merged 2 commits into from
Jan 7, 2022

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jan 6, 2022

In #3262, the performance of transliterate was improved by running an
extract before translating, because extract has the facilities to do
parallel translate, and can read from a cache.

However, another thing extract does is discard translations from the
cache
if they are considered "dirty" for some reason. This reason
can be: the current source is different than the cached source, the
translation mechanism has changed, compilation didn't succeed last time,
or the types referenced in the example have changed.

This is actually not desirable for transliterate, which wants to
do a last-ditch effort to translate whatever is necessary to translate,
but should really take what it can from the cache if there's a cached
translation available.

Add a flag to allow reading dirty translations from the cache.

Also adds the rosetta coverage command, which I used to find out why
the Construct Hub performance on the newest aws-cdk-lib version is
still poor.


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

In #3262, the performance of `transliterate` was improved by running an
`extract` before translating, because `extract` has the facilities to do
parallel translate, and can read from a cache.

However, another thing `extract` does is *discard translations from the
cache* if they are considered "dirty" for some reason. This reason
can be: the current source is different than the cached source, the
translation mechanism has changed, compilation didn't succeed last time,
or the types referenced in the example have changed.

This is actually not desirable for `transliterate`, which wants to
do a last-ditch effort to translate whatever is necessary to translate,
but should really take what it can from the cache if there's a cached
translation available.

Add a flag to allow reading dirty translations from the cache.
@rix0rrr rix0rrr requested a review from a team January 6, 2022 17:11
@rix0rrr rix0rrr self-assigned this Jan 6, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 6, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 7, 2022

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Jan 7, 2022
@mergify mergify bot merged commit 7aa69a7 into main Jan 7, 2022
@mergify mergify bot deleted the huijbers/rosetta-non-compile branch January 7, 2022 11:29
@mergify
Copy link
Contributor

mergify bot commented Jan 7, 2022

Merging (with squash)...

@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants