Michael Viamari created KAFKA-9694:
--------------------------------------

             Summary: Reduce String Operations during WindowStore Operations
                 Key: KAFKA-9694
                 URL: https://issues.apache.org/jira/browse/KAFKA-9694
             Project: Kafka
          Issue Type: Improvement
          Components: streams
    Affects Versions: 2.4.0
            Reporter: Michael Viamari


During most (all?) window store operations, whenever a timestamp is required a 
call to {{ApiUtils.validateMillisecondXXXX}} is used to validate the inputs. 
This involves a call to {{ApiUtils.prepareMillisCheckFailMsgPrefix}}, which 
builds part of a string that is used for any necessary error messages. The 
string is constructed whether or not it is used, which incurs overhead 
penalties for the WindowStore operation. This has a nominally minimal impact, 
but can add up in scenarios that involve a lot of WindowStore operations, where 
performance is at a premium.

To reduce this overhead, {{ApiUtils.prepareMillisCheckFailMsgPrefix}} could 
return a {{Supplier<String>}} instead, so that the string operations only occur 
when the string is needed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to