[owl-s] Serious performance problem

Thorsten Möller Thorsten.Moeller at unibas.ch
Fri Jun 26 10:58:03 EDT 2009


On Thursday, June 25, 2009 5:22 PM [GMT+1=CET],
Jim Andreou <jim.andreou at gmail.com> wrote (with possible deletions):

> Hi all,
> I did some profiling, and I found that it is surprizingly expensive
> to call
>
> profile.getInputs()
>
> It turns out the problem is sorting the inputs before returning them.
> Not that sorting itself is slow (I was only testing just with 2
> inputs!), but the comparator being used creates the toString()
> representation of the inputs, which is done by concat'ing getLabel()
> + getParamType() + getURI(), where the most expensive is the
> getLabel() which is translated to a jena triple query, and it goes
> on...
>
> Anyway, it is clear that sorting the results (even more: according to
> an undocumented and arbitrary order - as good as random order) is
> needless. So such sorting calls should be removed. (such calls are
> made in other methods, I didn't do a full project scan). Thorsten,
> are you reading this?
I agree with you. I know of this sorting since quite a while now and was 
wondering what might be a use case that justifies this behavior. But 
I've never realized that it is a performance issue. It was not removed 
yet for legacy reasons (maybe someone depends on it). Since there is 
this large housecleaning, refactoring, extending going on anyway for the 
next version 2.2, I will remove this there. This does affect 
corresponding methods in ProcessImpl and ProfileImpl.

Cheers,
Thorsten 




More information about the OWL-S mailing list