summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishesh Handa <me@vhanda.in>2013-05-25 19:25:45 (GMT)
committerVishesh Handa <me@vhanda.in>2013-05-25 19:25:45 (GMT)
commitdda25ad5818ef41832a141267f1b614a8dbc6b99 (patch)
treed4d863db23fa82ca05d0684824a00d4a85f4e881
parent4437f5ab2d4448266e96fae981ba1c248727260c (diff)
Virtuoso Query Result Iterator Backend: Avoid calling setError and lastError()
They both require setting of a mutex. This way we can avoid it. When transfering large amounts of data, it makes a very minor difference (roughly 0.5-1%)
-rw-r--r--backends/virtuoso/virtuosoqueryresultiteratorbackend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/virtuoso/virtuosoqueryresultiteratorbackend.cpp b/backends/virtuoso/virtuosoqueryresultiteratorbackend.cpp
index 9cb9e06..24b8f4e 100644
--- a/backends/virtuoso/virtuosoqueryresultiteratorbackend.cpp
+++ b/backends/virtuoso/virtuosoqueryresultiteratorbackend.cpp
@@ -146,8 +146,9 @@ bool Soprano::Virtuoso::QueryResultIteratorBackend::next()
d->bindingCache[i] = d->m_queryResult->getData( i+1 );
d->bindingCachedFlags.setBit( i );
- setError( d->m_queryResult->lastError() );
- if ( lastError() ) {
+ Error::Error error = d->m_queryResult->lastError();
+ if( error ) {
+ setError( error );
return false;
}
}