• dyung
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

 

I've created a simple Visualforce page and a simple controller.  I've created a Web tab and pointed it at the page's url.  Clicking on the tab simply gives a list of our org's unread emails related to Cases.   Most times it takes over 30 seconds to load and render, even though it's only returning 20 or so rows at any given time.

 

 

The page:

 

<apex:page controller="emailController" tabstyle="emailmessage" sidebar="true"> <apex:pageBlock > <apex:pageBlockTable value="{!emails}" var="m"> <apex:column headerValue="Case" value="{!m.ParentId}"/> <apex:column headerValue="Closed" value="{!m.Parent.IsClosed}"/> <apex:column headerValue="Received" value="{!m.messagedate}"/> <apex:column headerValue="Owner" value="{!m.Parent.Owner.Name}"/> <apex:column value="{!m.fromaddress}"/> <apex:column value="{!m.toaddress}"/> <apex:column value="{!m.subject}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>

 

 

The controller:

 

 

public class emailController { List<EmailMessage> emails = [select id,ParentId, Parent.Owner.Name,Parent.IsClosed, Parent.ClosedDate,status,fromaddress,toaddress,messagedate,subject from emailMessage where status ='0' order by Parent.IsClosed asc, messagedate desc ]; public List<EmailMessage> getEmails() { return emails; } }

 

What could possibly be causing a 30-second delay on this?  I'm not saying that Salesforce.com performs that fantastically in the best of times for those of us on European instances, but 30 seconds for such a simple page is a little bit absurd. 

 

Any input is greatly appreciated!!