app/vmselect/netstorage: unpack series blocks in the current goroutine if their count doesnt exceed 100

This should improve performance a bit for common case
This commit is contained in:
Aliaksandr Valialkin 2023-01-12 01:29:42 -08:00
parent d33a65e401
commit 41b0b951f3
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -485,7 +485,7 @@ func (pts *packedTimeseries) unpackTo(dst []*sortBlock, tbfs []*tmpBlocksFile, t
upw.addr = addr
upw.tr = tr
}
if gomaxprocs == 1 || upwsLen == 1 {
if gomaxprocs == 1 || upwsLen <= 100 {
// It is faster to unpack all the data in the current goroutine.
upw := getUnpackWork()
samples := 0