mirror of
https://github.com/tw93/Mole.git
synced 2026-02-05 21:58:01 +00:00
fix: avoid orphan service false positives and warm large file threshold
This commit is contained in:
@@ -3,18 +3,19 @@ package main
|
||||
import "time"
|
||||
|
||||
const (
|
||||
maxEntries = 30
|
||||
maxLargeFiles = 20
|
||||
barWidth = 24
|
||||
spotlightMinFileSize = 100 << 20
|
||||
defaultViewport = 12
|
||||
overviewCacheTTL = 7 * 24 * time.Hour
|
||||
overviewCacheFile = "overview_sizes.json"
|
||||
duTimeout = 30 * time.Second
|
||||
mdlsTimeout = 5 * time.Second
|
||||
maxConcurrentOverview = 8
|
||||
batchUpdateSize = 100
|
||||
cacheModTimeGrace = 30 * time.Minute
|
||||
maxEntries = 30
|
||||
maxLargeFiles = 20
|
||||
barWidth = 24
|
||||
spotlightMinFileSize = 100 << 20
|
||||
largeFileWarmupMinSize = 1 << 20
|
||||
defaultViewport = 12
|
||||
overviewCacheTTL = 7 * 24 * time.Hour
|
||||
overviewCacheFile = "overview_sizes.json"
|
||||
duTimeout = 30 * time.Second
|
||||
mdlsTimeout = 5 * time.Second
|
||||
maxConcurrentOverview = 8
|
||||
batchUpdateSize = 100
|
||||
cacheModTimeGrace = 30 * time.Minute
|
||||
|
||||
// Worker pool limits.
|
||||
minWorkers = 16
|
||||
|
||||
@@ -37,7 +37,7 @@ func scanPathConcurrent(root string, filesScanned, dirsScanned, bytesScanned *in
|
||||
|
||||
largeFilesHeap := &largeFileHeap{}
|
||||
heap.Init(largeFilesHeap)
|
||||
largeFileMinSize := int64(0)
|
||||
largeFileMinSize := int64(largeFileWarmupMinSize)
|
||||
|
||||
// Worker pool sized for I/O-bound scanning.
|
||||
numWorkers := max(runtime.NumCPU()*cpuMultiplier, minWorkers)
|
||||
|
||||
Reference in New Issue
Block a user