Open t-b opened 1 year ago
I think this part
numItems = ItemsInList(input, listSepStr)
for(i = 0; i < numItems; i += 1)
output += TrimString(StringFromList(i, input, listSepStr))
output += listSepStr
endfor
can be optimized by splitting the content in a text wave first and then iterating over it. The current approach has to many StringFromList
calls which are really slow because it needs to scan the whole string repeatedly.
IP9.03 r40067
Code:
Profiling output:
Trimming the string should not be that slow. With > IP7 one can use multithread statements with text waves, maybe that is faster.