Dan Bolser | 11 Mar 02:16 2011
Picon

Benchmarking results: Was "Re: Recursive ask using format=template, stuck at depth of 3?"

Result: Recursion here isn't terrible for performance.

Details:

Yaron kindly set "SMWResultPrinter::$maxRecursionDepth = 40" on
http://scratchpad.referata.com and I did some testing.

For some reason, the level of recursion now stops at level 20 (??).
I'm doing everything as before:
* http://scratchpad.referata.com/wiki/Piston
* http://scratchpad.referata.com/wiki/Template:Part_of_what

Pages higher in the tree don't hit this limit, and the template
'terminates' correctly, e.g.
* http://scratchpad.referata.com/wiki/Foo

I benchmarked the performance hit due to recursion by requesting each
page in the tree 20 times using curl, and parsing out the '<!-- Served
in 0.451 secs. -->' string in the returned URL. Every page request was
done with the 'action=purge' CGI setting.

The results are quite interesting, suggesting that each recursion adds
0.02 seconds to the 'serve time' on scratchpad.referata.com:
* http://imagepaste.nullnetwork.net/img/1299805257test_benchmark.png
* http://oi56.tinypic.com/2gx41oy.jpg # duplicate upload

About the above plot, upper and lower triangles are +/- s.d. of the
mean load time (squares) in 20 trials. After depth 20 the behaviour
changes because the template doesn't deal well with this limit
condition and a large (null) results set is generated each time (see
(Continue reading)

Dan Bolser | 15 Mar 14:34 2011
Picon

Re: Benchmarking results: Was "Re: Recursive ask using format=template, stuck at depth of 3?"

Anyone know / guess why a) the limit is 20, b) the query goes awry at the limit?

Cheers,
Dan.

On 11 March 2011 01:16, Dan Bolser <dan.bolser@...> wrote:
> Result: Recursion here isn't terrible for performance.
>
> Details:
>
> Yaron kindly set "SMWResultPrinter::$maxRecursionDepth = 40" on
> http://scratchpad.referata.com and I did some testing.
>
> For some reason, the level of recursion now stops at level 20 (??).
> I'm doing everything as before:
> * http://scratchpad.referata.com/wiki/Piston
> * http://scratchpad.referata.com/wiki/Template:Part_of_what
>
> Pages higher in the tree don't hit this limit, and the template
> 'terminates' correctly, e.g.
> * http://scratchpad.referata.com/wiki/Foo
>
> I benchmarked the performance hit due to recursion by requesting each
> page in the tree 20 times using curl, and parsing out the '<!-- Served
> in 0.451 secs. -->' string in the returned URL. Every page request was
> done with the 'action=purge' CGI setting.
>
> The results are quite interesting, suggesting that each recursion adds
> 0.02 seconds to the 'serve time' on scratchpad.referata.com:
> * http://imagepaste.nullnetwork.net/img/1299805257test_benchmark.png
(Continue reading)

Markus Krötzsch | 15 Mar 15:20 2011

Re: [SMW-devel] Benchmarking results: Was "Re: Recursive ask using format=template, stuck at depth of 3?"

On 15/03/11 13:34, Dan Bolser wrote:
> Anyone know / guess why a) the limit is 20, b) the query goes awry at the limit?

MediaWiki has a global restriction on the number of parser functions 
that may be used on one page. Maybe this or a similar MW "emergency 
break" could be a reason for this limitation.

I am not sure if the current embedding limit in SMW is still needed, 
since there are now a number of additional global controls that prevent 
arbitrary multiplication of transclusion in such queries (the concern 
originally was not transclusion performance but multiplication of the 
same embedded page due to its appearance in a great number of results). 
It might be that it would be safe to increase the limit by default.

Cheers,

Markus

>
> On 11 March 2011 01:16, Dan Bolser<dan.bolser@...>  wrote:
>> Result: Recursion here isn't terrible for performance.
>>
>> Details:
>>
>> Yaron kindly set "SMWResultPrinter::$maxRecursionDepth = 40" on
>> http://scratchpad.referata.com and I did some testing.
>>
>> For some reason, the level of recursion now stops at level 20 (??).
>> I'm doing everything as before:
>> * http://scratchpad.referata.com/wiki/Piston
(Continue reading)


Gmane