much improved "ls -al" performance

This commit is contained in:
Chris Lu
2018-11-07 11:35:13 -08:00
parent 60db731e36
commit ed8efb5aef
3 changed files with 34 additions and 16 deletions

View File

@@ -35,7 +35,7 @@ type WFS struct {
func NewSeaweedFileSystem(option *Option) *WFS {
return &WFS{
option: option,
listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(6000).ItemsToPrune(100)),
listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(int64(option.DirListingLimit) + 200).ItemsToPrune(100)),
pathToHandleIndex: make(map[string]int),
}
}