[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nepomuk
Subject:    Re: [Nepomuk] Review Request 111513: Use parameterized ODBC queries for adding statements
From:       "Sebastian Trueg" <sebastian () trueg ! de>
Date:       2013-10-09 16:45:55
Message-ID: 20131009164555.25905.9658 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111513/
-----------------------------------------------------------

(Updated Oct. 9, 2013, 4:45 p.m.)


Status
------

This change has been marked as submitted.


Review request for Nepomuk and Vishesh Handa.


Repository: soprano


Description
-------

Soprano uses only plain query strings for all operations via ODBC (Virtuoso). \
However, parameterized queries can provide a much better performance, especially for \
long string values. This patch (available in branch feature/odbcParameterizedQueries) \
makes Soprano use parameterized queries for addStatement at least.

This should fix the memory leaking problem with adding large plain text blobs given \
that addStatement is used (AFAIK the Nepomuk indexer currently uses custom queries to \
add the data).

Should this patch proove to be effective it should be expanded to use parameterized \
queries wherever possible like removeStatement. Also using prepared ODBC queries \
could improve the performance considerably, especially when adding a large amount of \
statements.


Diffs
-----

  backends/virtuoso/odbcconnection.h c87bcb7 
  backends/virtuoso/odbcconnection.cpp 754c76d 
  backends/virtuoso/virtuosomodel.cpp a884703 
  backends/virtuoso/virtuosomodel_p.h d5a86d8 

Diff: http://git.reviewboard.kde.org/r/111513/diff/


Testing
-------

Soprano tests run through smoothly. More performance and mem leakage testing needs to \
be done using Nepomuk.


Thanks,

Sebastian Trueg


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/111513/">http://git.reviewboard.kde.org/r/111513/</a>
  </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray \
solid;">  <tr>
  <td>
   <h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been \
marked as submitted.</h1>  </td>
 </tr>
</table>
<br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Nepomuk and Vishesh Handa.</div>
<div>By Sebastian Trueg.</div>


<p style="color: grey;"><i>Updated Oct. 9, 2013, 4:45 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
soprano
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Soprano uses only plain query strings for all operations via ODBC \
(Virtuoso). However, parameterized queries can provide a much better performance, \
especially for long string values. This patch (available in branch \
feature/odbcParameterizedQueries) makes Soprano use parameterized queries for \
addStatement at least.

This should fix the memory leaking problem with adding large plain text blobs given \
that addStatement is used (AFAIK the Nepomuk indexer currently uses custom queries to \
add the data).

Should this patch proove to be effective it should be expanded to use parameterized \
queries wherever possible like removeStatement. Also using prepared ODBC queries \
could improve the performance considerably, especially when adding a large amount of \
statements.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Soprano tests run through smoothly. More performance and mem leakage \
testing needs to be done using Nepomuk.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>backends/virtuoso/odbcconnection.h <span style="color: \
grey">(c87bcb7)</span></li>

 <li>backends/virtuoso/odbcconnection.cpp <span style="color: \
grey">(754c76d)</span></li>

 <li>backends/virtuoso/virtuosomodel.cpp <span style="color: \
grey">(a884703)</span></li>

 <li>backends/virtuoso/virtuosomodel_p.h <span style="color: \
grey">(d5a86d8)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/111513/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



_______________________________________________
Nepomuk mailing list
Nepomuk@kde.org
https://mail.kde.org/mailman/listinfo/nepomuk


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic