I haven't been able to find advice on this on the forum.
I have a batch receipt creation script that is bogging down when processing larger volumes and ultimately causing an out of memory exception. I have extensively analysed the plugin and progressively ruled out the SQL queries and various application logic calls, until narrowing it down to the cashBookForm.CashBook.AddNewTransaction call.
- Code: Select all
For Each eFTBatchDebtor As EFTBatchDebtor In eftBatchDebtors
ReturnCode = cashBookForm.CashBook.AddNewTransaction(JiwaCashBook.CashBookTransactionCollection.TransactionTypes.Debtor, eFTBatchDebtor.RecID, Key)
'[SNIP]
Next
A stopwatch on the above line, results in ...
As you can see, the call takes progressively longer to return as the loop iterates (until it fails - out of memory - at 450th debtor).
Can you advise on required housekeeping, or an alternate approach, to fix this?
Cheers,
Neil.



