caching visible intervals for read

speeds up 4x in single thread mode
speeds up 30% in 32 threads mode
This commit is contained in:
Chris Lu
2018-12-30 00:51:44 -08:00
parent 55f7d8f801
commit 0388d421d2
5 changed files with 54 additions and 37 deletions

View File

@@ -7,11 +7,11 @@ import (
"path/filepath"
"time"
"github.com/seaweedfs/fuse"
"github.com/seaweedfs/fuse/fs"
"github.com/chrislusf/seaweedfs/weed/filer2"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/seaweedfs/fuse"
"github.com/seaweedfs/fuse/fs"
)
type Dir struct {
@@ -101,10 +101,11 @@ func (dir *Dir) Attr(context context.Context, attr *fuse.Attr) error {
func (dir *Dir) newFile(name string, entry *filer_pb.Entry) *File {
return &File{
Name: name,
dir: dir,
wfs: dir.wfs,
entry: entry,
Name: name,
dir: dir,
wfs: dir.wfs,
entry: entry,
entryViewCache: nil,
}
}