Yakov Zhdanov created IGNITE-3233: ------------------------------------- Summary: 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: Semen Boikov Priority: Blocker 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)