Skip to content

Commit

Permalink
Merge pull request #108 from kubescape/update-map-size
Browse files Browse the repository at this point in the history
reduce map init size
  • Loading branch information
David Wertenteil authored Jul 25, 2023
2 parents ad37eb1 + 3916d3a commit 88d7a7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/filehandler/v1/inmemory.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"sync"
)

const initFileListLength = 5000
const updateFileListLength = 200
const initFileListLength = 500
const updateFileListLength = 20

type filesBucket struct {
lock *sync.RWMutex
Expand All @@ -23,7 +23,7 @@ var _ filehandler.FileHandler = (*InMemoryFileHandler)(nil)

func CreateInMemoryFileHandler() (*InMemoryFileHandler, error) {
return &InMemoryFileHandler{
buckets: make(map[string]*filesBucket, 20),
buckets: make(map[string]*filesBucket, 10),
}, nil
}

Expand Down

0 comments on commit 88d7a7f

Please sign in to comment.