compress: to use less ram (#691)

This commit is contained in:
Alex Sharov 2022-10-20 18:29:46 +07:00 committed by GitHub
parent 88e80dac7a
commit fcd7314c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ func NewCompressor(ctx context.Context, logPrefix, outputFile, tmpDir string, mi
wg.Add(workers)
suffixCollectors := make([]*etl.Collector, workers)
for i := 0; i < workers; i++ {
collector := etl.NewCollector(logPrefix+"_dict", tmpDir, etl.NewSortableBuffer(etl.BufferOptimalSize))
collector := etl.NewCollector(logPrefix+"_dict", tmpDir, etl.NewSortableBuffer(etl.BufferOptimalSize/2))
collector.LogLvl(lvl)
suffixCollectors[i] = collector