From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Pitre Subject: Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size Date: Mon, 09 Sep 2013 11:01:10 -0400 (EDT) Message-ID: References: <1378652660-6731-1-git-send-email-pclouds@gmail.com> <1378735087-4813-1-git-send-email-pclouds@gmail.com> <1378735087-4813-16-git-send-email-pclouds@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary_(ID_dBfBaLSM3GPxWJEoLuTQKQ)" Cc: git@vger.kernel.org To: =?VISCII?Q?Nguy=ADn_Th=E1i_Ng=F7c_Duy?= X-From: git-owner@vger.kernel.org Mon Sep 09 17:01:18 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VJ2xo-00027o-Ej for gcvg-git-2@plane.gmane.org; Mon, 09 Sep 2013 17:01:16 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752434Ab3IIPBM (ORCPT ); Mon, 9 Sep 2013 11:01:12 -0400 Received: from relais.videotron.ca ([24.201.245.36]:17398 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751640Ab3IIPBL (ORCPT ); Mon, 9 Sep 2013 11:01:11 -0400 Received: from yoda.home ([70.83.209.44]) by VL-VM-MR006.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0MSV00J755PYLO30@VL-VM-MR006.ip.videotron.ca> for git@vger.kernel.org; Mon, 09 Sep 2013 11:01:10 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 88BF32DA0625; Mon, 09 Sep 2013 11:01:10 -0400 (EDT) In-reply-to: <1378735087-4813-16-git-send-email-pclouds@gmail.com> User-Agent: Alpine 2.03 (LFD 1266 2009-07-14) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --Boundary_(ID_dBfBaLSM3GPxWJEoLuTQKQ) Content-type: TEXT/PLAIN; charset=UTF-8 Content-transfer-encoding: 8BIT On Mon, 9 Sep 2013, Nguyễn Thái Ngọc Duy wrote: > nr_objects in the next patch is used to reflect the number of actual > objects in the stream, which may be smaller than the number recorded > in pack header. This highlights an issue that has been nagging me for a while. We decided to send the final number of objects in the thin pack header for two reasons: 1) it allows to properly size the SHA1 table upfront which already contains entries for the omitted objects; 2) the whole pack doesn't have to be re-summed again after being completed on the receiving end since we don't alter the header. However this means that the progress meter will now be wrong and that's terrible ! Users *will* complain that the meter doesn't reach 100% and they'll protest for being denied the remaining objects during the transfer ! Joking aside, we should think about doing something about it. I was wondering if some kind of prefix to the pack stream could be inserted onto the wire when sending a pack v4. Something like: 'T', 'H', 'I', 'N', This 8-byte prefix would simply be discarded by index-pack after being parsed. What do you think? Nicolas --Boundary_(ID_dBfBaLSM3GPxWJEoLuTQKQ)--