changeset 19009:07e40d589b64

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.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 16 Apr 2013 00:40:21 +0200
parents 9d33d6e0d442
children e071d161b266
files hgext/largefiles/proto.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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())