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

@@ -153,6 +153,8 @@ func (file *File) maybeLoadAttributes(ctx context.Context) error {
glog.V(1).Infof("file attr %v %+v: %d", file.fullpath(), file.entry.Attributes, filer2.TotalSize(file.entry.Chunks))
file.wfs.listDirectoryEntriesCache.Set(file.fullpath(), file.entry, 300*time.Millisecond)
return nil
})