From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: Why is --pretty=format: so slow? Date: Sat, 03 Nov 2007 21:22:17 -0700 Message-ID: <7vmytuvdvq.fsf@gitster.siamese.dyndns.org> References: <18221.16318.785162.44769@cargo.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org, Johannes Schindelin To: Paul Mackerras X-From: git-owner@vger.kernel.org Sun Nov 04 05:22:39 2007 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1IoX0P-0006Ak-D8 for gcvg-git-2@gmane.org; Sun, 04 Nov 2007 05:22:37 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751040AbXKDEWY (ORCPT ); Sun, 4 Nov 2007 00:22:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751129AbXKDEWX (ORCPT ); Sun, 4 Nov 2007 00:22:23 -0400 Received: from sceptre.pobox.com ([207.106.133.20]:43167 "EHLO sceptre.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750913AbXKDEWX (ORCPT ); Sun, 4 Nov 2007 00:22:23 -0400 Received: from sceptre (localhost.localdomain [127.0.0.1]) by sceptre.pobox.com (Postfix) with ESMTP id 905DD2EF; Sun, 4 Nov 2007 00:22:44 -0400 (EDT) Received: from pobox.com (ip68-225-240-77.oc.oc.cox.net [68.225.240.77]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by sceptre.sasl.smtp.pobox.com (Postfix) with ESMTP id 2113A8F05C; Sun, 4 Nov 2007 00:22:41 -0400 (EDT) In-Reply-To: <18221.16318.785162.44769@cargo.ozlabs.ibm.com> (Paul Mackerras's message of "Sun, 4 Nov 2007 14:42:54 +1100") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Paul Mackerras writes: > Strace seems to indicate that git log is doing at least one sequence > of open, fstat64, fcntl64, getdents64 and close for each line of > output in the --pretty=format: cases, but not in the other cases. I bet that is coming from doing find_unique_abbrev() to fill fields %h, %t and %p, even when the output format does not ask for any of them. Dscho, can we stop calling find_unique_abbrev() unconditionally before being asked?