On Fri, Nov 23, 2012 at 2:25 PM, Anders Lund <[email protected]> wrote:

> On Fredag den 23. november 2012 14:16:22 Vishesh Handa wrote:
> > The problem with this approach is that every single url which is passed
> > through Nepomuk needs to be checked for the "filex" scheme and then
> > translated. Since we do not have a sparql parser this is done by
> employing
> > regular expressions to check for patterns with file:/mount/point and
> filex.
> >
> > Valgrind logs show that for small queries a sizable amount (upto 40%) of
> > time is spent in just this regular expression based parsing. Additionally
> > since queries can return any kind of data, all of the data passed from
> > virtuoso to Nepomuk has go through these checks.
>
> Why use regular expressions to search for a fixed string? Simple string
> comparison would be much more efficient for that!
>

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.

The relevant code can be found at
nepomuk-core/services/storage/removeablemediamodel.cpp - convertFilexUrl
and converFileUrls functions.


>
>
> --
> Anders
> _______________________________________________
> Nepomuk mailing list
> [email protected]
> https://mail.kde.org/mailman/listinfo/nepomuk
>



-- 
Vishesh Handa
_______________________________________________
Nepomuk mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/nepomuk

Reply via email to