How slow should dtml-var be? (was: RE: [Zope] Problems with *BIG* SQL queries)

Andy McKay andym@ActiveState.com
Wed, 21 Mar 2001 10:17:25 -0800


Yup sounds like its too much data, one thing that can vary of course is
rendering on the browser, large pages can take a long time just to be
rendered, for example lots of tables on Netscape. Your example includes no
HTML so thats just an off the wall comment.
--
  Andy McKay.


----- Original Message -----
From: "Mayers, Philip J" <p.mayers@ic.ac.uk>
To: "'Capesius, Alan'" <CapesiusA@Sysmex.com>; <zope@zope.org>
Sent: Wednesday, March 21, 2001 6:16 AM
Subject: How slow should dtml-var be? (was: RE: [Zope] Problems with *BIG*
SQL queries)


> As mentioned, I'm doing really big SQL queries which return a HTML report
> that's about 1Mb. The ZopeTime trick suggested by Alan helps a lot - the
> time spent really is on the Zope side, and happens even with the most
> minimal file - just a:
>
> <dtml-var "ZopeTime()">
> <dtml-in QUERY>
> <dtml-var column1>,<dtml-var column2>,<dtml-var column3>,<dtml-var
column4>
> </dtml-in>
> <dtml-var "ZopeTime()">
>
> This takes about 4 minutes *on the server* - file return is quick. *Sigh*.
> This however:
>
> <dtml-var "ZopeTime()">
> <dtml-in QUERY>
> </dtml-in>
> <dtml-var "ZopeTime()">
>
> Takes about 30 seconds (which is reasonable):
>
> HTTP/1.1 200 OK
> Date: Wed, 21 Mar 2001 14:02:07 GMT
> Server: Apache/1.3.14 (Unix)  (Red-Hat/Linux)
> X-Powered-By: Zope (www.zope.org), Python (www.python.org)
> Vary: Authorization
> Connection: close
> Content-Type: text/plain
>
> 2001/03/21 14:02:07.2783 GMT
> 2001/03/21 14:02:46.6733 GMT
>
> I can only assume it's the namespace lookup in <dtml-var variable> - in
> fact, my calculations (9575 rows, 4 <dtml-var>s per row) make that 6ms per
> dtml-var, which isn't unreasonable. I guess I really do just have too much
> data...
>
> Using a PythonScript:
>
> print context.ZopeTime()
> for result in container.QUERY():
>     print "%s,%s,%s,%s" % (r.column1,r.column2,r.column3,r.column4)
> print context.ZopeTime()
> return printed
>
> ...doesn't seem to help
>
> Regards,
> Phil
>
> +----------------------------------+
> | Phil Mayers, Network Support     |
> | Centre for Computing Services    |
> | Imperial College                 |
> +----------------------------------+
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>