Ri:Re: [Zope] Z-SQL Method performance

Stefano Vedovelli spinwing@inwind.it
Thu, 4 Apr 2002 17:15:53 +0200


Hello Jens
>one exception where the security machinery will not check are simply python 
>types (the return values from a ZSQL method are objects that contain the 
>results and not simple types), such as strings, lists, dictionaries etc. so 
>if you use an external method to get the result set and then convert it 
>inside the external method to such a simple type and hand that back to DTML 
>you will see a marked increase in speed.

consider this:
recordset =3D context.retrieve_all_contacts().dictionaries()
for record in recordset:
   for key in record.keys():
      print key, "=3D", record[key]

from my how-to http://www.zope.org/Members/spinwing/ZSQL_Results.

In this case, is Zope applying security as well? This is an internal python script.

This is interesting for me so that I can include it in the how-to.

Regards
Stefano