diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-11-07 11:35:13 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-11-07 11:35:13 -0800 |
| commit | ed8efb5aef4e2e7158d91d41eab54c052b0c3429 (patch) | |
| tree | 5a06cf27137f914f1ca60752a70d40ca9a25b386 /weed/filesys/file.go | |
| parent | 60db731e362adec2e0c27f3346d9fcff672a348d (diff) | |
| download | seaweedfs-ed8efb5aef4e2e7158d91d41eab54c052b0c3429.tar.xz seaweedfs-ed8efb5aef4e2e7158d91d41eab54c052b0c3429.zip | |
much improved "ls -al" performance
Diffstat (limited to 'weed/filesys/file.go')
| -rw-r--r-- | weed/filesys/file.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go index db9cb0a0f..df02fe8f2 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -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 }) |
