cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

getInputControlDataSource().getActiveSelectedMembers(); seems to be slow?

HenrikG
Explorer
0 Kudos
412

I have made a script which allows me to translate filters from one model used in one story, to a different model running a different story.

I start by getting the active selected members in the 4 present filters.

var activeSelectedMembers = InputControl_16.getInputControlDataSource().getActiveSelectedMembers();
var activeSelectedMembersProject = InputControl_14.getInputControlDataSource().getActiveSelectedMembers();
var activeSelectedMembersTime = InputControl_12.getInputControlDataSource().getActiveSelectedMembers();
var activeSelectedMembersGroup = InputControl_4.getInputControlDataSource().getActiveSelectedMembers();

After getting these I am performing quite a bit of logic to translate the origin model filters to fit the target model's filters. In the end I construct a NavigationUtils to open the other story and transferring correct filtering. Everything works perfectly, although seems to be very slow.
Through some performance tracking I have narrowed it down to the first 4 lines of "getInputControlDataSource()". These 4 together takes up 95% of the processing time.

In total the button to construct the fancy link, takes around 20sec to complete. Which is enough time that I had to perform some button logic to tell the user that something was actually happening.

Curious why these are so heavy on performance?
And if there might be a better way of getting active members. Maybe a method of getting all 4 at the same time? Sequential queries is possibly slower?

Accepted Solutions (0)

Answers (0)