git-gui: Use a smaller pipe buffer for update-index.
When we shove a large number of files at update-index and they have very short path names we are likely going to fit a large number of them into the pipe buffer very early; thereby seeing a huge progress update followed by lots of waiting between progress updates due to the latency of update-index. Using a smaller buffer should help smooth out the progress updates as we are better able to keep tabs on the update-index process' progress through our list of paths. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Nov 12, 2006 at 19:33 UTC
7f09cfafa8acf507f3a1358e05002e566f41783f
1 file changed
+5
-1
git-gui
+5
-1
@@ -1171,7 +1171,11 @@ proc update_index {pathList} {
1171
$totalCnt \
1172
0.0]
1173
set fd [open "| git update-index --add --remove -z --stdin" w]
1174
- fconfigure $fd -blocking 0 -translation binary
1174
+ fconfigure $fd \
1175
+ -blocking 0 \
1176
+ -buffering full \
1177
+ -buffersize 512 \
1178
+ -translation binary
1179
fileevent $fd writable [list \
1180
write_update_index \
1181
$fd \