[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/runtime/nepomuk
From: Sebastian Trueg <sebastian () trueg ! de>
Date: 2007-11-30 21:13:25
Message-ID: 1196457205.796173.8137.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 743403 by trueg:
* Fixed mtime handling in strigi backend (apparently Strigi encodes mtime as unsigned int instead of \
xmls:dateTime)
* Improved performance by caching index transactions
* Start strigi indexing after starting strigi (IMHO this is something strigi should do, but then again I \
also think Strigi should not be a DBus autostart service!)
M +2 -0 nepomukserver.cpp
M +3 -1 repository.cpp
M +24 -3 strigibackend/sopranoindexreader.cpp
--- trunk/KDE/kdebase/runtime/nepomuk/nepomukserver.cpp #743402:743403
@@ -82,6 +82,8 @@
false
#endif
);
+
+ m_strigi->startIndexing();
}
}
--- trunk/KDE/kdebase/runtime/nepomuk/repository.cpp #743402:743403
@@ -73,7 +73,9 @@
rep->m_model = model;
rep->m_index = index;
rep->m_indexModel = new Soprano::Index::IndexFilterModel( index, model );
-// rep->m_indexModel->setTransactionCacheSize( 50 );
+
+ // FIXME: find a good value here
+ rep->m_indexModel->setTransactionCacheSize( 500 );
return rep;
}
else {
--- trunk/KDE/kdebase/runtime/nepomuk/strigibackend/sopranoindexreader.cpp #743402:743403
@@ -212,7 +212,13 @@
doc.mimetype = value;
}
else if (fieldName == FieldRegister::mtimeFieldName) {
- doc.mtime = s.object().literal().toDateTime().toTime_t();
+ // FIXME: Sadly in Xesam sourceModified is not typed as DateTime but defaults to an \
int :( We try to be compatible + if ( s.object().literal().isDateTime() ) {
+ doc.mtime = s.object().literal().toDateTime().toTime_t();
+ }
+ else {
+ doc.mtime = s.object().literal().toUnsignedInt();
+ }
}
else if (fieldName == FieldRegister::sizeFieldName) {
doc.size = s.object().literal().toInt64();
@@ -379,7 +385,14 @@
Node pathNode = result.binding( "path" );
Node mTimeNode = result.binding( "mtime" );
qDebug() << "file in index: " << pathNode.toString() << "mtime:" << \
mTimeNode.literal().toDateTime() << "(" << mTimeNode.literal().toDateTime().toTime_t() << \
")";
- children[std::string( pathNode.toString().toUtf8().data() )] = \
mTimeNode.literal().toDateTime().toTime_t(); +
+ // FIXME: Sadly in Xesam sourceModified is not typed as DateTime but defaults to an int :( We \
try to be compatible + if ( mTimeNode.literal().isDateTime() ) {
+ children[std::string( pathNode.toString().toUtf8().data() )] = \
mTimeNode.literal().toDateTime().toTime_t(); + }
+ else {
+ children[std::string( pathNode.toString().toUtf8().data() )] = \
mTimeNode.literal().toUnsignedInt(); + }
}
}
@@ -422,7 +435,15 @@
time_t mtime = 0;
if ( it.next() ) {
- mtime = it.binding( "mtime" ).literal().toDateTime().toTime_t();
+ ::Soprano::LiteralValue val = it.binding( "mtime" ).literal();
+
+ // FIXME: Sadly in Xesam sourceModified is not typed as DateTime but defaults to an int :( We \
try to be compatible + if ( val.isDateTime() ) {
+ mtime = val.toDateTime().toTime_t();
+ }
+ else {
+ mtime = val.toUnsignedInt();
+ }
}
return mtime;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic