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
VM hook redesign (optimized) #1182
Conversation
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.
Looks good to me
@@ -1412,7 +1430,7 @@ public void play(Program program) { | |||
@Deprecated | |||
public static void setVmHook(VMHook vmHook) { | |||
logger.warn("VM.setVmHook(VMHook vmHook) is deprecated method. Define your hook component as a Spring bean."); |
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.
I think we should add line that it will affect only new VM instances
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.
What do you mean? Could you explain more detailed?
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.
Ahh ok, it looks like a very old code and as it's going to be deprecated, not an isuue
|
||
@Autowired | ||
public RootVmHook(Optional<List<VMHook>> hooks) { | ||
this.hooks = hooks.orElseGet(ArrayList::new); | ||
public RootVmHook(Optional<VMHook[]> hooks) { |
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.
Not a blocker, but I would prefer using List instead of arrays as far as it's not critical. As soon as we added hasHooks
flag this place is no more performance critical
Adds performance optimization on proxy calls to nested and deprecated VM hooks.
Adds VM hooks testing support via
StandaloneBlockchain
.Increases SpringFramework version up to
4.3.19.RELEASE
.