Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Cc: Neil Cahill <ncahill_alt@×××××.com>
Subject: Re: [gentoo-dev] Patch to sys-apps/portage-2.2.7 giving 2% performance increase
Date: Sat, 19 Oct 2013 05:38:12
Message-Id: 201310190138.05889.vapier@gentoo.org
In Reply to: [gentoo-dev] Patch to sys-apps/portage-2.2.7 giving 2% performance increase by Neil Cahill
1 On Friday 18 October 2013 12:46:18 Neil Cahill wrote:
2 > I profiled an execution of "emerge -pv sed" to look for easy ways to
3 > increase the speed of that command. The following 2-line patch gives a 2%
4 > reduced run time. The profile showed that regex matching accounts for
5 > 8.3% of the run time, so these updated regular expressions are at least
6 > 25% quicker. I hoped it would help more but it should all add up.
7 >
8 > As I get more time I may look to submit other small improvements.
9 >
10 > As for how the patch works, the version number part of a package name has
11 > many options so that part of the regular expression is time consuming. It
12 > was advantageous to use an assertion to visit that part of the expression
13 > less often. Python since 2.4 supports what I've used so this should work
14 > on all current versions.
15
16 please send patches to gentoo-portage-dev@l.g.o
17
18 also, please do not use HTML
19 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Patch to sys-apps/portage-2.2.7 giving 2% performance increase Alexander Berntsen <alexander@××××××.net>