Re: [dabo-users] Add From Data Environment (Not Responding)

Author: Ed Leafe

Posted: 2012-04-12 at 17:09:26

On Apr 12, 2012, at 4:19 PM, John Fabiani wrote:

> for tb in tbls:

> fldDict = {}

> flds = crs.getFields(tb)

> for fld in flds:

> fldname = fld[0]

> fldInfo = fldDict[fldname] = {}

> fldInfo["type"] = fld[1]

> fldInfo["pk"] = fld[2]

> self._dataEnv[tb] = fldDict

> return True

Looking at this, I'm wondering if it could be sped up a bit using a list comp:

self._dataEnv = dict([(tb, dict([(fld[0], {"type": fld[1], "pk": fld[2]})

for fld in crs.getFields(tb)]))

for tb in crs.getTables()])

I don't have any db schemas that would generate a noticeable time difference. Cheryl, if I sent you a modified version of the wizard, would you be able to test it out to see if it improves the performance for your database?

-- Ed Leafe

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/1AFA15C4-8270-4E45-BE4C-B0B21CCD409A@leafe.com

©2012 Ed Leafe