RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: [EMAIL PROTECTED]
Module: rpm Date: 02-May-2008 18:13:53
Branch: HEAD Handle: 2008050216135201
Modified files:
rpm CHANGES
rpm/rpmdb header.c
Log:
- jbj: compute tag store w subtract (measured 26.3% rpm -qa speedup
ymmv).
Summary:
Revision Changes Path
1.2315 +1 -0 rpm/CHANGES
1.156 +14 -1 rpm/rpmdb/header.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2314 -r1.2315 CHANGES
--- rpm/CHANGES 2 May 2008 16:10:48 -0000 1.2314
+++ rpm/CHANGES 2 May 2008 16:13:52 -0000 1.2315
@@ -1,5 +1,6 @@
5.1.0 -> 5.2a0:
+ - jbj: compute tag store w subtract (measured 26.3% rpm -qa speedup
ymmv).
- jbj: initialize ts->PRCO lazily (measured 20.4% rpm -qa speedup ymmv).
- glen: print error when makeTempPath fails due missing temp dir
- jbj: add _fdopen to FDIO_t, expose fdbg(), make lzdio.c standalone.
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/header.c
============================================================================
$ cvs diff -u -r1.155 -r1.156 header.c
--- rpm/rpmdb/header.c 23 Apr 2008 13:40:57 -0000 1.155
+++ rpm/rpmdb/header.c 2 May 2008 16:13:53 -0000 1.156
@@ -27,6 +27,8 @@
/[EMAIL PROTECTED] entryInfo @*/
/[EMAIL PROTECTED] indexEntry @*/
+int _fastdatalength = 1;
+
/** \ingroup header
*/
/[EMAIL PROTECTED]@*/
@@ -424,9 +426,20 @@
p.ptr = ie.data;
pend.ui8p = (uint8_t *) dataEnd;
+
+ /* Find the length of the tag data store. */
+ if (dataEnd && _fastdatalength) {
+ /* Compute the tag data store length using offsets. */
+ if (il > 1)
+ ie.length = ((uint32_t) ntohl(pe[1].offset) - ie.info.offset);
+ else
+ ie.length = (dataEnd - t);
+ } else {
+ /* Compute the tag data store length by counting. */
/[EMAIL PROTECTED]@*/ /* pend.ui8p derived from dataLength may be
null */
- ie.length = dataLength(ie.info.type, &p, ie.info.count, 1, &pend);
+ ie.length = dataLength(ie.info.type, &p, ie.info.count, 1, &pend);
/[EMAIL PROTECTED]@*/
+ }
if (ie.length == 0 || hdrchkData(ie.length))
return 0;
@@ .
______________________________________________________________________
RPM Package Manager http://rpm5.org
CVS Sources Repository [email protected]