Skip to Content

Initializing datasource with multiple variables

I'm currently having performance issues with a (rather large) application in a customer scenario. This application uses quite a few datasources (roughly 20) of which most contain at least 3 variables.

Due to the requirements, merge prompts is set to false. Most of the datasources are loaded in the onStartup event (which I realize probably isn't a best-practice), but this is something that I know how to tweak.

The problem I'm having however, is that the datasources all seem to reload as soon as a variable is set. for example:


DS_1.setVariableValueExt(dimensionX, value);

DS_1.setVariableValueExt(dimensionY, value);

DS_1.setVariableValueExt(dimensionZ, value);

Is there something obvious I'm overlooking or is there no wat to set the variables and then load the datasource? Putting the DS_1.loadDatasource(); after the other 3 lines doesn't seem to be the answer, but maybe there is another solution?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Posted on Feb 18, 2017 at 12:43 PM

    Hi Roy,

    You are not overlooking anything. What you are experiencing is the standard behaviour. If you are loading a data source by script, then the only way to set the variables is after the loadDataSource() method, exactly as you have done in your example. setVariableValueExt() does indeed trigger a reload of the data source. However, in theory at least, if you execute setVariableValueExt() immediately after the loadDataSource() method, in your example the setting of the 3 variable values should occur simultaneously with the data source load triggered by loadDataSource().

    In your scenario, are you suggesting that data source DS_1 is being loaded 4 times, once for loadDataSource() and then 3 times again, once for each of the variables?



    Add comment
    10|10000 characters needed characters exceeded