Thanks Paulo for your quick response. I've answered your questions below:
were you able to replicate the issue also in an isolated test environment ?
No - I'll do that and let you know what happens.
Could you isolate all the query executed for a single iteration (comparing start time vs a slow iteration later in time) ?
I started by timing entire functions, then sub-portions of those functions, and I continued this narrowing-down process until it was clear the saveData(newPacketRecord) commands are the problem. I am recording the time it takes for just the saveData(newPacketRecord) commands and it is clearly those times that is increasing.
Why do you use a foundset as a global variable instead of getting a new foundset each time ? What happens if you get a new foundset object to create the record at each insert instead of using a global variable ?
I have tested this using local vars for the foundsets and it made no difference. I got the idea to use a global var form
this article on Gary Dotzlaw's website. It seemed smart to have Servoy create the foundset object once and re-use it rather than make Servoy create and destroy it thousands of times.
The issue as you described it seems related to a foundset which is growing linearly with the execution time... but you say that you clear it after each save data.
Correct
Are you sure that there are no other foundset object which are refering to all the created records ?
I'm sure. The only foundset on the packets table is the global one which I clear after each save.
Also, I just tried turning off databroadcasting to see if that would make a difference but it made no difference.
Do you think it could be related to the jdbc driver? As I said I'm using a jdbc3 driver and I'm working on getting the jdbc4 driver working.