Replace StringBuilder.Append(string.Join(...)) calls with StringBuilder.AppendJoin(...) to improve performance and reduce memory allocations.