cancel
Showing results for 
Search instead for 
Did you mean: 

Queries Being Executed Again

Former Member
0 Kudos

Hello Community

I developed a dashboard in version 1.5 SP0. There are 5 tabs and around 16 Bex datasources in total.

As per suggested, i applied dobackgroundprocessing rule, i.e. in starting i only run first tabs' datasources, and rest of them are running in backgroundprocessing.

In background processing part, i put alert to show me when loading has finished.

After i got the alert, i start navigating between tabs, and i expect no more query executions, however especially 2 tabs' queries are being executed again. (i double-checked it in SM66)

What do you think the reason can be?

I have no scripts in those tabs like "Reload or getData" and i don t do selections in charts.

Thank you for your inputs,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sathish,

As far as I know, when you have the ALERT line after loaddatasource() script line, it does not behave in the way that you have actually thought.

Lets consider for example - DS_Items is a data source that would take 3 seconds to load and you have given the script as:

On Background Processing Event :

DS_Items.loaddatasource();

APPLICATION.alert("data source load complete");

Now, when this event's script is executed, Design Studio would execute the first line - Initiate the Loading of the data source In the background and as soon as the initiation is done, it executes the ALERT. It doesn't wait for 3 seconds - for the Data Source to complete its loading.

The 2 tabs that that you have mentioned might have data sources that would take a lot of time to load. That's the reason why you see the queries getting loaded slowly.

Thanks,

Gowtham S

Former Member
0 Kudos

Hello Gowtham

Thank you, i did not know this.

But i also check the finishing time of execution via SM66. When i m sure that there is no more process running by me, then i start navigating. And the moment i open those tabs, processes start again.

Regards

TammyPowlas
Active Contributor
0 Kudos

Have you run profiling, as described by Karol here:

Former Member
0 Kudos

Thank you Tammy, i checked them lately, and they are really useful to understand the reason behind long runtimes and improve the performance.

However my problem is not long runtimes, i need to see why they re being fired again.

Regards

Former Member
0 Kudos

Hi Satish,

You better try TRACE. Hope you know how to turn on Runtime Trace. In that you can see what is taking your time. You can see clearly if its the DataSources or the Java Time (loading components), which takes time to load when you click on the tabs.

Thanks and Regards,

Gowtham S

Former Member
0 Kudos

Thanks,

I can see from SM66 that my datasources are running again.

Do you have any other ideas what may be causing re-calling of datasources during navigation?

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sathish,

A simple workaround is to load the respective data sources on click on the tabs.This improves performance as compared to the background processing.


On Select of the tabs :

if (DS_FILTER.isInitialized())

{

}

else

{

  DS_FILTER.loadDataSource();

}


Former Member
0 Kudos

Hi Noel

I prefer loading datasources in the beginning to reduce the waiting time during navigation.

But i used your logic to check if my datasources are initialized after background processing and result is positive. Thanks for this idea.

Former Member
0 Kudos

Hi Sathish,

Then you can use the above script on the background processing to avoid multiple loads.

Regards,

Noel

Former Member
0 Kudos

Noel, is there any command to prevent datasources to be loaded?

Otherwise, for example, i check if DS_1 is initialized, "if yes, then do nothing" is not really helping. It is not stopping them to be reloaded.

Thank you anyways

Former Member
0 Kudos

Sathish, There is no such command to prevent datasources to be loaded. Another work around with a flag variable can be tried.

Define a global boolean variable "flag" with initial value false.


on background processing   :-


if (flag==(false))

{

load data source.

flag == true;

}

with this , the data source gets initialised only once.

Former Member
0 Kudos

Hi Noel

Problem is, 2nd loading is not realizing in BackGround Processing part.

So this control will be passed only 1 time at the beginning.

Thanks again

TammyPowlas
Active Contributor
0 Kudos

Hi - if you are requesting more help with this, we'll need more information, like how your scripts are set up.  Screen shots will help

Keep in mind too with 1.5 that Parallel Processing with BEx / BW is an option, as Karol explains here:

Former Member
0 Kudos

Hi Tammy

Here s "On Background Processing" script.

Unfortunately, i can not use parallel processing because i have to merge prompts.

But my primary concern is not the initial running time, i don t want some queries to be fired again during navigation.

Thanks