-
Notifications
You must be signed in to change notification settings - Fork 67
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
cache parsed results across multiple runs #667
Conversation
Generate changelog in
|
@rzpt mind giving a bit more details about how you're using Conjure? Given that it is typically used an executable, I don't believe the change you have made will have any impact across "run"s |
Sorry, multiple "runs" is not the right word. I meant the loop here: https://github.com/palantir/conjure/blob/master/conjure-core/src/main/java/com/palantir/conjure/defs/Conjure.java#L38 In a certain internal repo, we have many conjure yml files in a single project (117), and certain files are being parsed many times while invoking the gradle conjure-ir task. Many of these files were being parsed several times, with one of them being parsed 40+ times. |
It seems like I can't write the changelog by using changelog-app? Can you do that for me? |
Ok, rather than introducing static state could we refactor the code to allow us to re-use the Recursive parser? |
Done. |
@ferozco Can this be merged? I can't write a changelog with the changelog-app. Could you try that? |
👍 |
Failed to load project - please reach out to #dev-foundry-infra or check Aries to debug |
I've fixed up the changelog so we can cut a release with this fix. #669 |
Before this PR
Parsed results were not cached between runs, so certain common files could be parsed many times in a single run.
After this PR
==COMMIT_MSG==
Each conjure file will only be parsed once
==COMMIT_MSG==
Possible downsides?
The code is no longer thread safe due to sharing of a static HashMap across threads, but the cli is single-threaded.