File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import (
23
23
"sort"
24
24
"strconv"
25
25
"strings"
26
- "sync"
27
26
"time"
28
27
"unicode/utf8"
29
28
"unsafe"
@@ -2431,16 +2430,11 @@ func (ds *datumsSorter) Swap(i, j int) {
2431
2430
ds .datums [i ], ds .datums [j ] = ds .datums [j ], ds .datums [i ]
2432
2431
}
2433
2432
2434
- var strBuilderPool = sync.Pool {New : func () any { return & strings.Builder {} }}
2435
-
2436
2433
// DatumsToString converts several datums to formatted string.
2437
2434
func DatumsToString (datums []Datum , handleSpecialValue bool ) (string , error ) {
2438
2435
n := len (datums )
2439
- builder := strBuilderPool .Get ().(* strings.Builder )
2440
- defer func () {
2441
- builder .Reset ()
2442
- strBuilderPool .Put (builder )
2443
- }()
2436
+ builder := & strings.Builder {}
2437
+ builder .Grow (8 * n )
2444
2438
if n > 1 {
2445
2439
builder .WriteString ("(" )
2446
2440
}
You can’t perform that action at this time.
0 commit comments