-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Benchmark of transfer_nested_constants option. #405
Conversation
Shows a non-trivial performance impact.
cc @pat as an FYI because you were involved in the original discussion. |
What do you think about adding a config option that specifies a default for |
@xaviershay appreciate the cc, though you both know this topic far better than I do, so I'm happy to defer to your judgement. |
I think given the performance difference its worth defaulting as false and then adding a |
Added configuration option. |
ensure | ||
config.transfer_nested_constants = original_value | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the "with isolated configuration" shared context to manage the configuration isolation. Just include the context in your example group:
describe "the example group" do
include_context "with isolated configuration"
# ...
end
This looks great. Nice and simple. Just one suggestion that will cleanup the spec a bit. |
@myronmarston oh neat. I added a small refactoring of the verifying double specs as well to use it too. |
This looks good. Nice to see that you were able to cleanup some other specs, too :). I just kicked the errored builds (I suspect github's DDOS problems today are causing build issues). |
(it's green now too.) |
Benchmark of transfer_nested_constants option.
Works for me. |
Shows a non-trivial performance impact, though low absolute time for the common case.
I'm inclined to leave the default value as false, reconsidering if it happens to cause a lot of user confusion.
WDYT @myronmarston?
Resolves #395.