Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9694

Reduce String Operations during WindowStore Operations

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.4.0
    • Fix Version/s: None
    • Component/s: streams
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mviamari Michael Viamari
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: