Optimize lookupPackage() a bit
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 16 Apr 2013 04:14:10 +0000 (07:14 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 7 Jun 2013 09:22:24 +0000 (12:22 +0300)
commit6f27f1c2fc6aef17eeb10201f9cf48e20b81a037
treea310f0db6a7ff5bcea6849285e8694c4aa8719ab
parentc6101677a1d6bc6eae84f4729aae5af1fabe6a8b
Optimize lookupPackage() a bit

- Remember the name of sub-packages in the Package struct, avoiding
  the need for headerGetString() in a loop, and also avoid unnecessary
  strdup() in the case name is not a partial one.
- Somewhat hysterically, this more than halves the time to parse the
  infamous texlive.spec on my laptop: the parse time is down from
  10.2s to 4.9s.
(cherry picked from commit 9929459f9967ecfe0a05d557bc42531944faa70a)
build/parsePreamble.c
build/rpmbuild_internal.h
build/spec.c