RC3 Extremely slow when showing related fields

I’m uploading a solution that should demonstrate the following issues. I got it to behave this way 3 times in a row and then gave up for the night.

PROBLEM
A) when I execute a method to create related records for 1000 records (to ‘mark records’ by adding keys in a related table), it takes 2 SECONDS TO CREATE EACH RECORD. However, when I remove any related fields from the master form, it goes much quicker.

NOTE: The issue is that as it loops through the records to create a related record for each record in the master form, it takes about 2 seconds to create each record when there are related fields on the master form - but goes much faster when there are no related fields on the master form. So it seems to be trying to refresh or something that is really holding it up. Logging is turned off, etc.

B) When I click ESCAPE to escape out of this deathly long method, I have to hit escape about 30 times, very rapidly in a row, to get Servoy to stop. And then it opens up the method editor, freezes for about 3 seconds, and then pauses. Then when I go back to the solution and try to execute another method, it gives an error saying it can’t execute the method. Strange things start happening. It also says it ‘cant read form’ for certain forms. I literally have to close Servoy and open it again for it to start working.

TO REPLICATE BEHAVIOR

  1. import this solution
  2. open it up and go to form ‘customerlist’
  3. Create a found set of about 1000 records
  4. Selec ‘MARK_ALL’ from methods
  5. Notice it will bring you to another form and you can see how fast it’s processing by how fast the record scroller, on the right, moves down.
  6. Press escape and try to escape this method and note the freezing and odd behavior
  7. Once vou’ve got it back in your control, go back to the ‘customerlist’ form and remove the category_related field on the right and notice how it processes much faster.

Thank you.

Hi Chris,

first of all, you can reduce your MARK_ALL method by replacing with this code:

for(var i = 1 ; i<=controller.getMaxRecordIndex() ; i++)
{
	controller.recordIndex = i
	forms.related_list.controller.newRecord()
	forms.related_list.customerid = customerid
}

The related field in the customer list is indeed slowing things down in developer.

However, I also tested on the client side, which is much faster.
(developer has much more overhead, mainly because of the debugger> scripts aren’t compiled, user interface is refreshed more frequently)

Can you please do a test on the client?

We did manage to optimize this, will be available in Servoy 2.0 rc4