Set fastdirty on for files larger than 50kb
@@ -188,8 +188,13 @@ func NewBuffer(reader io.Reader, size int64, path string) *Buffer {
}
if !b.Settings["fastdirty"].(bool) {
+ if size > 50000 {
+ // If the file is larger than a megabyte fastdirty needs to be on
+ b.Settings["fastdirty"] = true
+ } else {
b.origHash = md5.Sum([]byte(b.String()))
}
+ }
b.cursors = []*Cursor{&b.Cursor}
