You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Semen Boikov (JIRA)" <ji...@apache.org> on 2016/06/03 06:10:59 UTC
[jira] [Assigned] (IGNITE-3233) need to optimize injections
[ https://issues.apache.org/jira/browse/IGNITE-3233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Semen Boikov reassigned IGNITE-3233:
------------------------------------
Assignee: Yakov Zhdanov (was: Semen Boikov)
Investigated issue: created micro-benchmark, did not find any difference between closures with/without injection. Looked at test where we got 3 times slowdown, found that test was invalid (size of closure with injection was > 10 times larger). Created test with equal closures, got the same performance with/without inject. So I think we do not have problems with injection.
According to proposed API changes: not sure we need change anything, with SpringResource annotaton code look not so bad:
{noformat}
@SpringResource(resourceName ="beanName")
Object bean;
{noformat}
> need to optimize injections
> ---------------------------
>
> Key: IGNITE-3233
> URL: https://issues.apache.org/jira/browse/IGNITE-3233
> Project: Ignite
> Issue Type: Improvement
> Reporter: Yakov Zhdanov
> Assignee: Yakov Zhdanov
> Priority: Blocker
> Labels: community, performance
> Fix For: 1.7
>
>
> {noformat}
> I want to check how this closure performs vs empty one:
> ignite.compute().affinityCall(xx, xx, new IgniteCallable<Object>() {
> @IgniteInstanceResource
> Ignite ignite;
>
> @SpringApplicationContextResource
> ApplicationContext ctx;
>
> Object bean1;
> Object bean2;
>
>
> @Override public Object call() throws Exception {
> bean1 = ctx.getBean(bean1class);
> bean2 = ctx.getBean(bean2class);
>
> return null;
> }
> });
> {noformat}
> Closure above is 3 times slower than Noop closure. Injections should be optimized.
> I see the following options:
> # Annotations
> ## Introduce SpringAware annotation and annotate each object that will need injection including SPI and internal stuff
> ## Support Spring Autowire annotation.
> ## I am not sure about the approach. We can use ApplicationContext.autowire() or generate and compile code that will do injections.
> # Interfaces
> ## IgniteAware
> ## Spring ApplicationContext aware
> ## ...
> Implementor should suggest and back solution with microbenchmarks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)