Author: dmacvicar
Date: Wed Jul 11 14:17:00 2007
New Revision: 5970
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5970&view=rev
Log:
- disable the sqlite vm opcode progress tick for now
- only read capabilities from the repository we are creating.
(sooo fast now!!!)
Modified:
branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.cc
branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.h
Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.cc?rev=5970&r1=5969&r2=5970&view=diff
==============================================================================
--- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.cc (original)
+++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.cc Wed Jul 11 14:17:00 2007
@@ -75,7 +75,7 @@
if ( r )
return r->progress_handler(ptr);
- return false;
+ return 1;
}
void RepoImpl::factoryInit()
@@ -92,7 +92,7 @@
{
if ( _ticks.tick() )
return 1;
- return 0;
+ return 1;
}
void RepoImpl::createResolvables()
@@ -106,7 +106,7 @@
try
{
sqlite3_connection con((_options.dbdir + "zypp.db").asString().c_str());
- con.setprogresshandler(500, global_progress_handler, (void*)this);
+ //con.setprogresshandler(100, global_progress_handler, (void*)this);
con.executenonquery("PRAGMA cache_size=8000;");
con.executenonquery("BEGIN;");
@@ -137,7 +137,7 @@
_ticks.tick();
- read_capabilities( con, nvras );
+ read_capabilities( con, _options.repository_id, nvras );
_ticks.tick();
@@ -223,7 +223,7 @@
try
{
sqlite3_connection con((_options.dbdir + "zypp.db").asString().c_str());
- con.setprogresshandler(500, global_progress_handler, (void*)this);
+ //con.setprogresshandler(500, global_progress_handler, (void*)this);
con.executenonquery("PRAGMA cache_size=8000;");
con.executenonquery("BEGIN;");
@@ -339,6 +339,7 @@
}
void RepoImpl::read_capabilities( sqlite3_connection &con,
+ data::RecordId repo_id,
map > &nvras )
{
CapFactory capfactory;
@@ -358,18 +359,20 @@
//
// }
// }
- sqlite3_command select_named_cmd( con, "select v.refers_kind, n.name, v.version, v.release, v.epoch, v.relation, v.dependency_type, v.resolvable_id from named_capabilities v, names n where v.name_id=n.id;");
- sqlite3_command select_file_cmd( con, "select fc.refers_kind, dn.name, fn.name, fc.dependency_type, fc.resolvable_id from file_capabilities fc, files f, dir_names dn, file_names fn where f.id=fc.file_id and f.dir_name_id=dn.id and f.file_name_id=fn.id;");
+ sqlite3_command select_named_cmd( con, "select v.refers_kind, n.name, v.version, v.release, v.epoch, v.relation, v.dependency_type, v.resolvable_id from named_capabilities v, names n, resolvables res where v.name_id=n.id and v.resolvable_id=res.id and res.repository_id=:repo_id;");
- sqlite3_command select_hal_cmd( con, "select hc.refers_kind, hc.name, hc.value, hc.relation, hc.dependency_type, hc.resolvable_id from hal_capabilities hc;");
+ sqlite3_command select_file_cmd( con, "select fc.refers_kind, dn.name, fn.name, fc.dependency_type, fc.resolvable_id from file_capabilities fc, files f, dir_names dn, file_names fn, resolvables res where f.id=fc.file_id and f.dir_name_id=dn.id and f.file_name_id=fn.id and fc.resolvable_id=res.id and res.repository_id=:repo_id;");
+
+ sqlite3_command select_hal_cmd( con, "select hc.refers_kind, hc.name, hc.value, hc.relation, hc.dependency_type, hc.resolvable_id from hal_capabilities hc, resolvables res where hc.resolvable_id=res.id and res.repository_id=:repo_id;");
- sqlite3_command select_modalias_cmd( con, "select mc.refers_kind, mc.name, mc.value, mc.relation, mc.dependency_type, mc.resolvable_id from modalias_capabilities mc;");
+ sqlite3_command select_modalias_cmd( con, "select mc.refers_kind, mc.name, mc.value, mc.relation, mc.dependency_type, mc.resolvable_id from modalias_capabilities mc, resolvables res where mc.resolvable_id=res.id and res.repository_id=:repo_id;");
- sqlite3_command select_other_cmd( con, "select oc.refers_kind, oc.value, oc.dependency_type, oc.resolvable_id from other_capabilities oc;");
+ sqlite3_command select_other_cmd( con, "select oc.refers_kind, oc.value, oc.dependency_type, oc.resolvable_id from other_capabilities oc, resolvables res where oc.resolvable_id=res.id and res.repository_id=:repo_id;");
{
debug::Measure mnc("read named capabilities");
+ select_named_cmd.bind(":repo_id", repo_id);
sqlite3_reader reader = select_named_cmd.executereader();
while ( reader.read() )
{
@@ -396,6 +399,7 @@
{
debug::Measure mnf("read file capabilities");
+ select_file_cmd.bind(":repo_id", repo_id);
sqlite3_reader reader = select_file_cmd.executereader();
while ( reader.read() )
{
@@ -409,6 +413,7 @@
{
debug::Measure mnf("read hal capabilities");
+ select_hal_cmd.bind(":repo_id", repo_id);
sqlite3_reader reader = select_hal_cmd.executereader();
while ( reader.read() )
{
@@ -426,6 +431,7 @@
{
debug::Measure mnf("read modalias capabilities");
+ select_modalias_cmd.bind(":repo_id", repo_id);
sqlite3_reader reader = select_modalias_cmd.executereader();
while ( reader.read() )
{
@@ -443,6 +449,7 @@
{
debug::Measure mnf("read other capabilities");
+ select_other_cmd.bind(":repo_id", repo_id);
sqlite3_reader reader = select_other_cmd.executereader();
while ( reader.read() )
{
Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.h?rev=5970&r1=5969&r2=5970&view=diff
==============================================================================
--- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.h (original)
+++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/RepoImpl.h Wed Jul 11 14:17:00 2007
@@ -78,6 +78,7 @@
cache::ResolvableQuery resolvableQuery();
private:
void read_capabilities( sqlite3x::sqlite3_connection &con,
+ data::RecordId repo_id,
std::map > &nvras );
cache::CacheTypes _type_cache;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org