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

perf(Cloak.Config.all/0): remove calls to ensure_loaded when checking… #51

Merged
merged 1 commit into from
Jan 11, 2018

Conversation

tomciopp
Copy link
Contributor

… for ciphers

@danielberkompas I noticed a fairly significant slowdown in my test suite (229 => 590 secs) after updating cloak to 0.5.0. I tracked it down to the following lines. (that I myself added) I originally added the ensure_loaded as an additional safety check but it should not be necessary.

On a separate note it may be useful to add a dummy cipher for testing so that we don't actually perform any expensive encrypting or decrypting calls. If you think that is a good idea, I will explore adding it to the codebase.

@danielberkompas
Copy link
Owner

This looks good. Regarding a dummy cipher, that could be useful for some folks.

Personally, I would want to use the real cipher in test mode to make sure that production won't act any differently, but others might not think the same way.

@danielberkompas danielberkompas merged commit b3af005 into danielberkompas:master Jan 11, 2018
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