On 4 Oct, 2006, at 14:37, Morgen Sagen wrote:

I did try replacing those mStart and mEnd calls like this:

   testVal = getattr(EventStamp(view[key]), startAttrName)

with calls like this:

testVal = view.findValue(key, getattr(EventStamp, startAttrName).name)

to avoid loading, but overall a similar number of items was being loaded anyway (32 items loaded versus 34, if I recall). Also, there are some cases where findValue( ) doesn't work -- when an attribute is Calculated, the item needs to be loaded and getattr used.

True, but you can refactor the Calculated to work with view.findValues (). This is hard to do in the general case, but it turns out that those mStart() and mEnd() functions are only ever called with a startAttr of 'effectiveStartTime' and endAttr of 'effectiveEndTime'.

--Grant


_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to