dabo Commit
Revision 5197
Date: 2009-05-02 05:20:40 -0700 (Sat, 02 May 2009)
Author: Pedro.Gato
Trac: http://trac.dabodev.com/changeset/5197
Changed:
U trunk/dabo/db/dCursorMixin.py
Log:
Speedup getDataSet when using VirtualFields by only calculating the requested
ones, this results in huge speed improvements when using lots of VirtualFields
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2009-04-29 18:46:02 UTC (rev 5196)
+++ trunk/dabo/db/dCursorMixin.py 2009-05-02 12:20:40 UTC (rev 5197)
@@ -1103,7 +1103,9 @@
if row >= rowStart and row < (rowStart+rows):
tmprec = rec.copy()
for k, v in self.VirtualFields.items():
- tmprec.update({k: self.getFieldVal(k,
row)})
+ # only calc requested virtualFields
+ if (flds and k in flds) or not flds:
+ tmprec.update({k:
self.getFieldVal(k, row)})
if flds:
# user specified specific fields - get
rid of all others
for k in tmprec.keys():
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]