durusmail: quixote-users: Re: nevow performance...
nevow performance...
Re: nevow performance...
2004-01-27
2004-01-27
Re: nevow performance...
Graham Fawcett
2004-01-27
Christoph Devenoges wrote:
> hi,
>
> why does
>
> def nevowStyle(x, y):
>     return table(border=1, cellpadding=10, cellspacing=10)[
>          [tr[
>              [td['%s - %s' % (j, i)] for j in range(y)]] for i in range(x)]]
>
> take 3 times longer to execute then
>
> def ptlStyle [html] (x, y):
>     ''
>     for i in range(x):
>       ''
>       for j in range(y):
>           '' % (i, j)
>       ''
>     '
%s - %s
' > > ? Good question. (Before going any further, we really ought to find a new name for this thing if we're going to keep talking about it. It's not really Nevow, after all, but a knock-off of Nevow. Perhaps 'ninn' (ninn is not Nevow)? Or 'Nuevo'? Or, if you don't like it, 'that damn Nevow-like thing that threatens to infect Quixote'.) One possible reason is that PTL is optimized for quick string-joining; the Nevow-thing is not. That's my only guess about performance. I never profiled the code, nor ever tried to optimize it. My advice would be to run the thing through the profiler, and see what you get (and maybe report back the results!). > > is somebody going to publish an Arch archive for nevow? (me?) It won't be me; I haven't had time to tackle the whole Arch thing yet; feel free to publish it if you want to, Chris. -- Graham
reply