Paul,

I think that I may have tracked down the cause of the issue. Apparently dabo
is scanning each child table for each record in the primary bizob.  I
modified the dBizobj getChangedRows method to use the child's getChangedRows
method vs scanning every record.

This is just a rough proposal, but it seems to work just fine.

What I am doing is just adding the currentRow to this list of changed rows
if any child has any changes.

The reason that I am only checking only the current row is that if any child
bizobj had required a requery, then the user must have had either no changes
to the child bizobjs or already saved them.

Below please see my proposed mod.

Thanks,
Larry


--- C:\Users\owner\AppData\Local\Temp\dBizobj.py-revBASE.svn000.tmp.py Fri
May  8 14:23:45 2009
+++ C:\dabo\dabo\biz\dBizobj.py Fri May  8 14:10:19 2009
@@ -636,11 +636,18 @@
   record that has not been modified from its defaults will suffice to mark
the
   record as changed.
   """
-  if self.__children:
-   # Must iterate all records to find potential changes in children:
-   self.__changedRows = []
-   self.scan(self._listChangedRows)
-   return self.__changedRows
+  changedrows=self._CurrentCursor.getChangedRows(includeNewUnchanged)
+
+  if self.__children and self.RowNumber not in changedrows:
+   childischanged=False
+   for child in self.__children:
+    if child._CurrentCursor.getChangedRows(includeNewUnchanged):
+     childischanged=True
+     break
+   if childischanged:
+    changedrows.append(self.RowNumber)
+   return changedrows
+  
   else:
    # Can use the much faster cursor.getChangedRows():
    return self._CurrentCursor.getChangedRows(includeNewUnchanged) 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Paul McNett
> Sent: Friday, May 08, 2009 12:10 PM
> To: Dabo developers' list
> Subject: Re: [dabo-dev] confirmChanges() == No but we scan away
> 
> johnf wrote:
> > On Friday 08 May 2009 08:59:35 am Paul McNett wrote:
> >> johnf wrote:
> >>> A new clue.  I believe that Dabo is calling getFields 
> 1586 times.  
> >>> At least the postgres log is showing pages and pages of 
> that request.
> >> Ok, so what is calling getFields().
> >>
> >> Paul
> > 
> > dCursorMixin.py -> _setTable()
> > 
> > and the stack tells me that
> > crs.Table = self._dataSource is calling dCursorMixin.py->_setTable()
> 
> Well something's definitely wrong, if this is happening 
> inside a cancel() cycle.
> 
> Paul
> 
> 
[excessive quoting removed by server]

_______________________________________________
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/!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAafA2fnYuPUOMNFpIYnBEQcKAAAAQAAAAgPAwAMxQqku0VEGT/[email protected]

Reply via email to