I use code like this to build one string from an string array:
class ActionCMD { // "class" to avoid value copies when updating string members
var cmds = [String]() // simply the list of all strings to speed up inserting
var cmd : String { return cmds.reduce("", +) } // resulting string
}
But for 35.000 strings it needs 15 min. Is there a better (quicker) way to do the concatenating?
return cmds.joined()String? Perhaps some preprocessing can be made to speed things upreduce, in a playground takes 0.0003 seconds for me on a few year old MacBook Pro so even though my test is far from precise I feel the issue must lay somewhere else for you