nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Payne (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (NIFI-5801) Evaluating Expression Language can in many cases be made much more efficient
Date Thu, 13 Jun 2019 15:41:01 GMT

     [ https://issues.apache.org/jira/browse/NIFI-5801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark Payne updated NIFI-5801:
-----------------------------
    Status: Open  (was: Patch Available)

> Evaluating Expression Language can in many cases be made much more efficient
> ----------------------------------------------------------------------------
>
>                 Key: NIFI-5801
>                 URL: https://issues.apache.org/jira/browse/NIFI-5801
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> When a StandardPropertyValue is obtained and evaluateAttributeExpressions is called,
it builds the entire Evaluator Tree each time. This was done to ensure that Evaluator.evaluate()
is called only once. However, the requirement to call this only once was introduced as a way
to have anyMatchingAttribute, anyAttribute, allMatchingAttributes, allAttributes, etc. methods
work, and these are rarely used. I.e., we introduced semantics that significantly slow performance
in order to provide functionality that is used maybe 1% of the time. Instead, we should optimize
for the 99% use case and incur a penalty, if necessary, in the 1% use case instead. Profiling
the ConsumeKafkaRecord processor shows that 80% of the time in that method is evaluating Expression
Language for `${schema.name}` to determine which schema should be used. We can likely make
this evaluation just as quick as attributeMap.get("schema.name") by pre-building the Evaluators
and re-using them.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message