Tristan Seligmann ha scritto:
* Manlio Perillo <[EMAIL PROTECTED]> [2006-12-15 11:56:55 +0100]:

First let me say that I really like Nevow template system.
Once you became expert with it, it proves to be really flexible.

The problem is the performance.
I have done a simple test with the rendering of a table 5 * 20, Nevow against Django, and Nevow is much slower.

The problem is that, I think, there are a lot of objects adaptation.

Can you be more specific about this? What objects are being adapted, and
why do you think this is the cause of slowness?


I'm not sure on what's the problem.

However if I render this template (without data):

<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml";
      xmlns:n="http://nevow.com/ns/nevow/0.1";
      lang="en" xml:lang="en">
  <head>
    <title>Test performance</title>
  </head>
  <body>
    <p>Some test</p>
  </body>
</html>



I got ( 100000 * t.timeit(number=10000) / 10000) )

[EMAIL PROTECTED]:~/projects/tests/nevow$ python static2.py
9.85 usec/pass

[EMAIL PROTECTED]:~/projects/tests/django$ python static2.py
13.31 usec/pass


Nevow for every data object calls inevow.IContainer.child.
The problem can be here, since it is called 25 times (the number of rows in the table)



Regards  Manlio Perillo

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to