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

VM hook redesign (optimized) #1182

Merged
merged 5 commits into from Sep 21, 2018
Merged

VM hook redesign (optimized) #1182

merged 5 commits into from Sep 21, 2018

Conversation

eugene-shevchenko
Copy link
Contributor

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.

Copy link
Collaborator

@zilm13 zilm13 left a 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.");
Copy link
Collaborator

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

Copy link
Contributor Author

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?

Copy link
Collaborator

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) {
Copy link
Member

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

@mkalinin mkalinin merged commit 78b4b27 into develop Sep 21, 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

4 participants