[
https://issues.apache.org/jira/browse/IGNITE-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14351957#comment-14351957
]
Sergey Evdokimov commented on IGNITE-47:
----------------------------------------
The problem was in resource injection.
Ignite does injection to nested fields if field type is IgniteClosure, Runnable
or Callable. When user runs a closure GridClosureManager creates a job with
field "IgniteClosure closure" that contains user closure. Ignite tries to
inject resources to job with nested field but does this not-optimal although
user closure does not contain any resources annotation.
I added marker interface GridNoImplicitInjection that disables injection to
nested fields and marks all tasks/jobs in GridClosureManager as
GridNoImplicitInjection. Injection to user closure performs using
GridInternalWrapper interface, that works optimally. Also I profiled job and
closure execution and make some minor performance optimization.
I think Ignite must not inject resources to IgniteClosure/Runnable/Callable
fields automatically, it's not obvious for user and can be cause of performance
problem (injection to nested fields works not-optimal) I suggest to create
@InjectRecursively annotation.
> Improve closures performance.
> -----------------------------
>
> Key: IGNITE-47
> URL: https://issues.apache.org/jira/browse/IGNITE-47
> Project: Ignite
> Issue Type: Improvement
> Components: compute
> Affects Versions: sprint-1
> Reporter: Vladimir Ozerov
> Assignee: Sergey Evdokimov
> Priority: Critical
> Fix For: sprint-2
>
>
> Benchmarks show that local execution of a single closure is ~25% slower than
> local execution of a single task with a single job.
> We need to find a way to improve that as lots of task-related stuff is not
> necessary for closures.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)