|
@@ -21,6 +21,7 @@ import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
"path"
|
|
|
+ "runtime"
|
|
|
"sync"
|
|
|
"time"
|
|
|
|
|
@@ -125,6 +126,10 @@ func FlushQueue() {
|
|
|
logging.LogErrorf("commit tx failed: %s", err)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ if 16 < i && 0 == i%256 {
|
|
|
+ runtime.GC()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
elapsed := time.Now().Sub(start).Milliseconds()
|