|
|
@ -39,6 +39,8 @@ type fileCache struct { |
|
|
|
func (fc *fileCache) scan(keyDir string) (mapset.Set[string], mapset.Set[string], mapset.Set[string], error) { |
|
|
|
func (fc *fileCache) scan(keyDir string) (mapset.Set[string], mapset.Set[string], mapset.Set[string], error) { |
|
|
|
t0 := time.Now() |
|
|
|
t0 := time.Now() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fc.mu.Lock() |
|
|
|
|
|
|
|
defer fc.mu.Unlock() |
|
|
|
// List all the files from the keystore folder
|
|
|
|
// List all the files from the keystore folder
|
|
|
|
files, err := os.ReadDir(keyDir) |
|
|
|
files, err := os.ReadDir(keyDir) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
@ -46,9 +48,6 @@ func (fc *fileCache) scan(keyDir string) (mapset.Set[string], mapset.Set[string] |
|
|
|
} |
|
|
|
} |
|
|
|
t1 := time.Now() |
|
|
|
t1 := time.Now() |
|
|
|
|
|
|
|
|
|
|
|
fc.mu.Lock() |
|
|
|
|
|
|
|
defer fc.mu.Unlock() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Iterate all the files and gather their metadata
|
|
|
|
// Iterate all the files and gather their metadata
|
|
|
|
all := mapset.NewThreadUnsafeSet[string]() |
|
|
|
all := mapset.NewThreadUnsafeSet[string]() |
|
|
|
mods := mapset.NewThreadUnsafeSet[string]() |
|
|
|
mods := mapset.NewThreadUnsafeSet[string]() |
|
|
|