Commit 1bb7d3b7 authored by Jim Fulton's avatar Jim Fulton

Title: Results class optimization

At: http://classic.zope.org:8080/Collector/Collector/2141/sview

Submitter:  John Eikenberry

Email:  jae@kavi.com

Description: We have a large query implemented via a SQL Method. We've
been messing with it to get the most speed out of it, and noticed a
large hit in the __init__() method on the Results class. We found that
with this simple tweak (see included patch) we got around a 180% speed
up. Not a ton, but pretty good for changing 3 lines of code.
parent 50aa72fe
......@@ -140,8 +140,9 @@ class Results:
'Result record class'
r.__record_schema__=schema
for k in filter(lambda k: k[:2]=='__', Record.__dict__.keys()):
setattr(r,k,getattr(Record,k))
for k in Record.__dict__.keys():
if k[:2]=='__':
setattr(r,k,getattr(Record,k))
# Add SQL Aliases
d=r.__dict__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment