Your message dated Thu, 13 May 2010 00:17:06 +0000
with message-id <e1ocm6s-0005gp...@ries.debian.org>
and subject line Bug#580837: fixed in debhelper 7.4.20
has caused the Debian Bug report #580837,
regarding debhelper calls too many times dpkg-architecture
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
580837: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580837
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: debhelper
Version: 7.4.19
Severity: minor

Hi,

With the introduction of dh(1), many packages now use it, including lintian 
for its testsuite. However, it comes with a great performance penalty compared 
to just "using what is needed."

While taking a look at what makes debhelper very slow I noticed it calls dpkg-
architecture many times per package (66 times for the majority of the 
packages).

Attached patch reduces the number of calls to dpkg-architecture to 36 for the 
majority of the packages. It is a small improvement but I believe there are 
other things that could be done to reduce the number of calls to dpkg-
architecture and to speed up debhelper in general.

The two calls to dpkg-architecture debhelper used to make were taking ~0.23s 
each. The single call to dpkg-architecture (without -q) takes ~0.24s, which 
means there's more or less an improvement of 0.22 seconds per use of Dh_Lib's 
buildarch() and buildos().

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
--- unpacked/usr/share/perl5/Debian/Debhelper/Dh_Lib.pm	2010-04-26 18:47:52.000000000 -0500
+++ /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm	2010-05-09 00:16:21.000000000 -0500
@@ -606,11 +606,23 @@
         return 0;
 }
 
-sub dpkg_architecture_value {
-	my $var = shift;
-	my $value=`dpkg-architecture -q$var` || error("dpkg-architecture failed");
-	chomp $value;
-	return $value;
+{
+	my %dpkg_arch_output;
+	sub dpkg_architecture_value {
+		my $var = shift;
+		local $_;
+		if (!exists($dpkg_arch_output{$var})) {
+			open(PIPE, '-|', 'dpkg-architecture')
+				or error("dpkg-architecture failed");
+			while (<PIPE>) {
+				my ($k, $v) = split(/=/);
+				chomp $v;
+				$dpkg_arch_output{$k} = $v;
+			}
+			close(PIPE);
+		}
+		return $dpkg_arch_output{$var};
+	}
 }
 
 # Returns the build architecture. (Memoized)

--- End Message ---
--- Begin Message ---
Source: debhelper
Source-Version: 7.4.20

We believe that the bug you reported is fixed in the latest version of
debhelper, which is due to be installed in the Debian FTP archive:

debhelper_7.4.20.dsc
  to main/d/debhelper/debhelper_7.4.20.dsc
debhelper_7.4.20.tar.gz
  to main/d/debhelper/debhelper_7.4.20.tar.gz
debhelper_7.4.20_all.deb
  to main/d/debhelper/debhelper_7.4.20_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 580...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joey Hess <jo...@debian.org> (supplier of updated debhelper package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 12 May 2010 20:06:02 -0400
Source: debhelper
Binary: debhelper
Architecture: source all
Version: 7.4.20
Distribution: unstable
Urgency: low
Maintainer: Joey Hess <jo...@debian.org>
Changed-By: Joey Hess <jo...@debian.org>
Description: 
 debhelper  - helper programs for debian/rules
Closes: 580837 581233
Changes: 
 debhelper (7.4.20) unstable; urgency=low
 .
   * Drop one more call to dpkg-architecture. Closes: #580837
     (Raphael Geissert)
   * Further reduce the number of calls to dpkg-architecture to zero,
     in a typical package with no explicit architecture mentions
     in control file or debhelper config files.
   * dh_perl: use debian_abi for XS modules. Closes: #581233
Checksums-Sha1: 
 0b82ccb1b89a5ed2388f7338078de133bca9e53f 1551 debhelper_7.4.20.dsc
 d9bdeabdc37fd81e646c08e6453bbda818da5fe5 357810 debhelper_7.4.20.tar.gz
 55cbd8cd81768b0a3d082dee7c23aad64682fe67 464914 debhelper_7.4.20_all.deb
Checksums-Sha256: 
 d28cf9fe412c7348ed213b671be61bd7fe73639bcba1d7b73420fe7e1aafb162 1551 
debhelper_7.4.20.dsc
 332f6e88f905aa1295881c16758dae9d976aa483e83928b8c894a50881e28806 357810 
debhelper_7.4.20.tar.gz
 3c4eb6ce3caa13ea8bd39d65d1e7de610bcc886139d5baf61d8ebcb8fc85cdbd 464914 
debhelper_7.4.20_all.deb
Files: 
 cedf84d7d3a8e2bc1474b889d3816631 1551 devel optional debhelper_7.4.20.dsc
 a338c2356458695c9b70fd94d3d366be 357810 devel optional debhelper_7.4.20.tar.gz
 9a0140e05f8ef324b3553e956244b798 464914 devel optional debhelper_7.4.20_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIVAwUBS+tDEckQ2SIlEuPHAQhfUg//bYtdbdOn9vHmKnQuQEH+D3R8+j4vyyR0
h5Zoulxi9F6IJAMS2FsE9u9ZMu8lxflxRIzXOpOl2FSvmCvOro/iVXlnSuWU0dld
qGO5+t8ZSkOJ+Sy9ufE5UFOxnD25AYPkLEXbQOir1htvJQC1wmL0LKiJpfTFCfQN
ZlVo0ddYC1vhK0jirA/LAYb3TGYAMRLLbZd21BSN+2PcXPkaVnFBIbC9e13r872E
bYtHUf7tR+fUKOTWgzvv3xmCJhPnp3O+NLO21N/W5nMjy1i/IeDNWCgUiYgAFNV3
U5dypnkAW8yV6QyuFhUnmsGoQjvT88fojtSgRVwzYCVFsnNSABC0xIzwyrDYwPto
EsJBlAvIpElwjinkXM2SunOYlkiJvixA1E0SdsymDhC7KswBLGA46l2TPlXiO/b3
c5rJylXIVEy3cYRr9u26IRzDWgTTg0/broaZGTMuDdq+MVEIC6GzxiQDT5Wi80/t
JFc/xJVX9+3XCY7+bq7WhYPDjgaLRjd2yjRbVZnHIptGbiy3yiSp8rzHwqyWIeL6
LT4zYdSNDv8KNUZy0p0075nt0lmp2Js3Xy7LcbywCPPQPBvx085O7i2ZjEZLP5UI
N5gjhKF8TgeRdbpmI8xbIKijCP0StaggtP1ycI4bBEz2z+TjkunLBva39IZDgBq7
F3oWsSS1CyQ=
=TZZl
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to