[zypp-commit] r7923 - in /branches/use-solv/libzypp/zypp: Dep.h Dependencies.h
Author: matz
Date: Mon Nov 26 03:45:38 2007
New Revision: 7923
URL: http://svn.opensuse.org/viewcvs/zypp?rev=7923&view=rev
Log:
Reduce the number of malloc calls by 500000 (from 2 millions!). It's
really no good idea to implement heavily used low-level data structures
with std::map<> or the like.
Modified:
branches/use-solv/libzypp/zypp/Dep.h
branches/use-solv/libzypp/zypp/Dependencies.h
Modified: branches/use-solv/libzypp/zypp/Dep.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/Dep.h?rev=7923&r1=7922&r2=7923&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/Dep.h (original)
+++ branches/use-solv/libzypp/zypp/Dep.h Mon Nov 26 03:45:38 2007
@@ -65,6 +65,7 @@
FRESHENS_e,
ENHANCES_e,
SUPPLEMENTS_e,
+ LAST_e,
};
/** Ctor from string.
Modified: branches/use-solv/libzypp/zypp/Dependencies.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/use-solv/libzypp/zypp/Dependencies.h?rev=7923&r1=7922&r2=7923&view=diff
==============================================================================
--- branches/use-solv/libzypp/zypp/Dependencies.h (original)
+++ branches/use-solv/libzypp/zypp/Dependencies.h Mon Nov 26 03:45:38 2007
@@ -31,14 +31,15 @@
struct Dependencies
{
CapSet & operator[]( Dep idx_r )
- { return _capsets[idx_r]; }
+ { return _capsets[idx_r.inSwitch()]; }
const CapSet & operator[]( Dep idx_r ) const
- { return const_cast
participants (1)
-
matz@svn.opensuse.org