R374 – Single line ESQL function found (including CopyEntireMessage)

Single line ESQL function found (including CopyEntireMessage)

To improve performance, code that can be inlined (small and not complex) should be considered for in-lining.

For example

CALL CopyMessageHeaders();
CALL CopyEntireMessage();

DECLARE unusedVariable CHARACTER = ‘x’;
DECLARE unusedVariable2 CHARACTER = ‘x’;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;

Could be refactored to the following

CALL CopyMessageHeaders();
SET OutputRoot = InputRoot;

DECLARE unusedVariable CHARACTER = ‘x’;
DECLARE unusedVariable2 CHARACTER = ‘x’;