function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NaishadhNaishadh 

VF Page performance issue.

Hi,
 
I have two visual Forces page which internally using single controller. Both the page simply fetches the record from 

SalesForce and display it in page Block table format. I have added them in same page layout in two different sections. 

I have tested both the pages individually and performance are excellent but when I add them in single page layout 

in two different section, sometime I get request time out error message or page takes too much time for loading. 


Also, attached the code.

 

<apex:page standardController="SPOT_Profile__c" extensions="SPOTController" showHeader="false" sidebar="false" tabStyle="SPOT_Profile__c"> <apex:form > <apex:inputhidden value="{!spotId}"/> <apex:pageblock > <apex:pageBlockTable value="{!campaignMemList}" var="campObj"> <apex:column headerValue="Lead"> <apex:outputLink value="/{!campObj.LeadId}" target="_blank">{!campObj.Lead.Name}</apex:outputLink> </apex:column> <apex:column headerValue="Contact"> <apex:outputLink value="/{!campObj.ContactId}" target="_blank">{!campObj.Contact.Name}</apex:outputLink> </apex:column> <apex:column headerValue="Campaign Name"> <apex:outputLink value="/{!campObj.CampaignId}" target="_blank">{!campObj.Campaign.Name}</apex:outputLink> </apex:column> <apex:column headerValue="Status"> <apex:outputLabel >{!campObj.Status}</apex:outputLabel> </apex:column> <apex:column headerValue="Member Status Updated"> <apex:outputLabel >{!campObj.LastModifiedDate}</apex:outputLabel> </apex:column> <apex:column headerValue="SunGard Segment"> <apex:outputLabel >{!campObj.Campaign.Segment__c}</apex:outputLabel> </apex:column> </apex:pageBlockTable> </apex:pageblock> </apex:form> </apex:page>

 

<apex:page standardController="SPOT_Profile__c" extensions="SPOTController" showHeader="false" sidebar="false" tabStyle="SPOT_Profile__c"> <apex:form > <apex:inputhidden value="{!spotId}"/> <apex:pageblock > <apex:pageBlockTable value="{!emailResultList}" var="emailObj"> <apex:column headerValue="Lead"> <apex:outputLink value="/{!emailObj.Lead__c}" target="_blank">{!emailObj.Lead__r.Name}</apex:outputLink> </apex:column> <apex:column headerValue="Contact"> <apex:outputLink value="/{!emailObj.Contact__c}" target="_blank">{!emailObj.Contact__r.Name}</apex:outputLink> </apex:column> <apex:column headerValue="Email Name"> <apex:outputLink value="/{!emailObj.Id}" target="_blank">{!emailObj.Name}</apex:outputLink> </apex:column> <apex:column headerValue="Date Opened"> <apex:outputLabel >{!emailObj.Date_Time_Opened__c}</apex:outputLabel> </apex:column> <apex:column headerValue="Date Sent"> <apex:outputLabel >{!emailObj.Date_Time_Sent__c}</apex:outputLabel> </apex:column> <apex:column headerValue="Total Clicks"> <apex:outputLabel >{!emailObj.Number_of_Total_Clicks__c}</apex:outputLabel> </apex:column> <apex:column headerValue="From Address"> <apex:outputLabel >{!emailObj.From_Address__c}</apex:outputLabel> </apex:column> </apex:pageBlockTable> </apex:pageblock> </apex:form> </apex:page>

 

 

public class SPOTController { public String spotId { get; set;} private final ApexPages.StandardController controller; List<xtma_Individual_Email_Result__c> emailResultList; List<CampaignMember> campaignMemList; /*public SPOTController() { }*/ public SPOTController(ApexPages.StandardController controller) { this.controller = controller; } public void loadEmailResults() { spotId = ApexPages.currentPage().getParameters().get('id'); emailResultList = new List<xtma_Individual_Email_Result__c> ([Select x.Name, x.Lead__r.Name, x.Lead__c, x.Id, x.Contact__r.Name, x.Contact__c,x.From_Address__c, x.Number_of_Total_Clicks__c, x.Date_Time_Sent__c, x.Date_Time_Opened__c From xtma_Individual_Email_Result__c x where x.Lead__r.SPOT_Profile__c = :spotId or x.Contact__r.SPOT_Profile__c = :spotId]); } public List<xtma_Individual_Email_Result__c> getEmailResultList() { loadEmailResults(); return emailResultList; } public void loadCampaignData() { spotId = ApexPages.currentPage().getParameters().get('id'); campaignMemList = new List<CampaignMember> ([Select c.Status, c.LeadId,c.Lead.Name, c.Id, c.Campaign.Segment__c, c.LastModifiedDate,c.Contact.Name, c.ContactId, c.Campaign.Name, c.CampaignId From CampaignMember c where c.Lead.SPOT_Profile__c = :spotId or c.Contact.SPOT_Profile__c = :spotId]); } public List<CampaignMember> getCampaignMemList() { loadCampaignData(); return campaignMemList; } }

 

 


Please help! 

 

 

 

Message Edited by Naishadh on 06-15-2009 02:57 AM
NaishadhNaishadh
Please help!