Closed MichaelHuth closed 4 months ago
Looking into the code it doesn't seem we create detailed reports before evaluating the result. Yes, we combine some strings but not the whole report.
The function CHECK_EQUAL_WAVES
calls IUTF_Wrapper#EQUAL_WAVE_WRAPPER
. The second function does some checks with the provided arguments (like tolerances and comparison modes). The detailed comparison is done in IUTF_Checks#AreWavesEqual
, which does a basic EqualWaves
first and only in case of a mismatch a detailed report is generated.
Yes, IUTF_Wrapper#EQUAL_WAVE_WRAPPER
does some additional stuff like fetching wave names or combining the empty details into an error message, which is not required if we have no error. And I think this is the only thing that can be improved.
takes some time as GetWaveNameInDFStr is expensive.
For this case it could be as easy as moving the message generation into AreWavesEqual.
I don't think there is a need to move these lines into another function. We can just wrap them in an if-statement that checks result
and only calls the expensive functions when needed.
The check for CHECK_EQUAL_WAVES is slow because we generate the detailed message before we evaluate the result.
Look into that, if the performance can be increased by not creating output strings that are not output in the end.