diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-04-23 17:33:50 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-23 17:34:51 -0700 |
commit | 1b10f52d598e41f9ffe3a851da2da746f3d3a47a (patch) | |
tree | 6a407ba5c57230cdfba84f8b74369be89f295069 /third_party/gvsync/gvsync.go | |
parent | db334f7154a1d4beedd8bd418a88c3f043ebe173 (diff) |
Remember file position during Readdir()
The caller must call Readdir() at least twice to detect
EOF. The old code was always restarting the directory
search and then skipping elements already seen, effectively
doubling the cost to read a directory. The code now
remembers the last offset and doesn't reposition the cursor
if next request comes at the same offset.
PiperOrigin-RevId: 244957816
Change-Id: If21a8dc68b76614adbcf4301439adfda40f2643f
Diffstat (limited to 'third_party/gvsync/gvsync.go')
0 files changed, 0 insertions, 0 deletions