<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 23, 2012 at 2:25 PM, Anders Lund <span dir="ltr"><<a href="mailto:anders@alweb.dk" target="_blank">anders@alweb.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Fredag den 23. november 2012 14:16:22 Vishesh Handa wrote:<br>
> The problem with this approach is that every single url which is passed<br>
> through Nepomuk needs to be checked for the "filex" scheme and then<br>
> translated. Since we do not have a sparql parser this is done by employing<br>
> regular expressions to check for patterns with file:/mount/point and filex.<br>
><br>
> Valgrind logs show that for small queries a sizable amount (upto 40%) of<br>
> time is spent in just this regular expression based parsing. Additionally<br>
> since queries can return any kind of data, all of the data passed from<br>
> virtuoso to Nepomuk has go through these checks.<br>
<br>
</div>Why use regular expressions to search for a fixed string? Simple string<br>
comparison would be much more efficient for that!<br></blockquote><div><br>My bad. We do not use regular expressions. We instead look through the entire query and try to pick up patterns by simple string comparisons.<br>
<br>The relevant code can be found at nepomuk-core/services/storage/removeablemediamodel.cpp - convertFilexUrl and converFileUrls functions.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Anders<br>
_______________________________________________<br>
Nepomuk mailing list<br>
<a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/nepomuk" target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><span style="color:rgb(192,192,192)">Vishesh Handa</span><br><br>
</div>