largefiles: use filechunkiter for iterating largefile when serving getlfile
The default file iterator is line based and will give odd chunk sizes - often
very short and relatively expensive.
--- a/hgext/largefiles/proto.py Mon Apr 15 23:37:43 2013 +0200
+++ b/hgext/largefiles/proto.py Tue Apr 16 00:40:21 2013 +0200
@@ -63,7 +63,7 @@
# ssh proto does for string responses.
def generator():
yield '%d\n' % length
- for chunk in f:
+ for chunk in util.filechunkiter(f):
yield chunk
return wireproto.streamres(generator())