cancel
Showing results for 
Search instead for 
Did you mean: 

loading all dataproviders at the same time in a template

former_member730190
Participant
0 Kudos

I have a web template with 3 options in a drop down box. Each displays a chart and is based on a different query. One chart is displayed on the initial load. When one of the other options in the drop down box is selected, it takes a while to load the other chart. This is because the query on which the chart is based is run only then. Is there a way to run all the queries before the web page is rendered and then show the results?

View Entire Topic
Former Member
0 Kudos

Hi,

If I understand right, you have a single Chart webitem bound to a single Data Provider DP. DP is assigned to Query1 on initial load. On change of DropDown selection, you reset DP to Query2/Query3 using SET_DATA_PROVIDER_PARAMETERS Command. I think this should be the ideal way of having the Query run on demand rather than having each of them run at template load. But if you are ok with increased load times, you can either have 3 DPs mapped to 3Qrys instead at design time & assign the respective DP to the Chart by SET_ITEM_PARAMETERS on DropDown selection OR have 3 separate Chart webitems each assigned to its own DP at design time; keep two hidden & make them visible on DropDown selection using SET_ITEM_PARAMETERS.

Instead you can work towards improving the performance of your Queries (nothing to do with WAD) by checking on Cache/QD options/Query Variables etc.

--Priya

former_member730190
Participant
0 Kudos

Hi Priya, Actually I am using method 2. 3 charts are assigned to 3 data providers, 2 are hidden initially and 1 displayed. But I noticed that the data providers get loaded only after the chart is chosen. Instead of a delay after the chart is selected, I would prefer a delay on template load.

I thought that all of them get populated at template lod time but that doesn't seem to be the case. I can't see any options on web template where I can specify that.

Former Member
0 Kudos

If you are simply changing the visibility of Chart webitems on DropDown selection, there is no way the DPs are resolved on selection. The DP Queries are definitely executed on template load. Are you engaging in some other activity on DropDown selection that is leading to increased time? Can you explain the action on DropDown selection?

--Priya

former_member730190
Participant
0 Kudos

Actually what the selection does is set properties of a container layout. So initially row 3 of container layout has chart 1. When option 2 of the drop down item is chosen, it changes row 3 to chart 2. This is the action for each selection in the drop down box.

There are 10 selections with 10 charts based on 10 views. 8 of the charts are on views of 1 query and 2 are on views of another query. The 8 load fast upon changing the selections. But the 2 load slow. If all the data providers are loaded on page load, why would the 2 load slow?