Skip to main content

Hi folks,

 

maybe someone has an idea for me:

I call a subform with three views.

On two of these views I have list controls (auto-complete). 5 list controls in total.

These need to be populated depending on a parameter of the subform.

 

So in the initalize rule I populate the list controls with the parameter as input value.

The results are correct, the list controls populate as expected.

 

The issue is, that this takes ages.

I'm talking up to more than a minute load time for a form with just those 5 list controls and a button on the third view.

 

The data for the list controls is coming from SQL tables (one per list control).

The SQL-Server itself does not show performance issues.

The tables are not big, the biggest one maybe 10000 items, no more.

 

What I've tried:

  1. Executing the rules in a batch - no difference
  2. Executing the rules asynchronously - the loading icon is not shown this long but the fields are not populated any faster. When trying to select a list control, it freezes until the population is finished.
  3. Isolation the population of the list controls and executing them in a different rule - no difference.
  4. Using Live Search - I can't seem to define the input value that way. So the speed is much better, but the result is wrong.

Tihs is really problematic!

 

System: K2 4.7 August 2017 Cumulative Update

 

Thanks in advance and take care,
Alex

We will likely need to further narrow down where the slowness is.


 


1.  If you execute each of these SmartObjects outside the context of SmartForms, using perhaps the SmartObject Services Tester tool; how is the execution duration for each SmartObject?


 


How does it add up?  For example, if it takes the form more than a minute to load, but each SmartObjects take 10 seconds  to return data, then 5 smo x 10s = 50s would indicate that perhaps they are executing one after another and is adding up to that 1 minute total time.


 


Or perhaps there is just one SmartObject that is taking a really long (60s), and as such the total form load will never be faster than 60s.  If this is the case, then we will likely need to consider speeding up this call by including input properties to return less/more applicable results (input properties will execute in SQL whereas filter will return all and filter in K2), perhaps using stored procedure or views to return less columns (only needed ones), or implementing it in another way that also fits the business need.  Is there a need to return 10000 items and how many columns per row?


 


2.  How long does it take to execute in purely SQL?


 


Perhaps some performance can be gained if the following setting is applicable:


https://help.k2.com/displaycontent.aspx?id=5998


 


Hi,

 

thanks for the reply.

I will look into these things, when I find the time, to really understand what the problem was.

In the meantime I went ahead and did indeed use views to limit the ammount of data returned.

I also found this KB article with performance considerations. Following the article I went for a picker control instead of a autocomplete control. This adds the extra step of using the search or choosing the right item from the suggestion list - but it also reduces the loadtime significantly, as the list-method on the SQL views is only executed when a picker is used.

 

Take care,

 

Alex


Oh, right:

If someone is reading this post, looking for a solution, let me just post seperately what had the biggest impact:

 

I switched the autocomplete control for a picker control to resolve the issue as suggested in this KB article


Reply