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
TH53TH53 

New UI + many items in a dataTable = horrible highlighting performance

We have a page with a dataTable that can hold up to 1000 items (for user experience purposes, pagination is not really an option). We also have the standard onrowmouseover and onrowmouseout settings to invoke the standard highlighting of a row to designate the current selection.

 

With the new UI that has arrived as part of Spring '10, we are seeing horrific performance results when the dataTable has a larger number of items in it (> 200 or so). If you mouse over and off a row, the highlighting takes forever to appear and lags WAY behind the mouse movement. The old UI did not have this problem. 

 

Has anyone else seen the same thing?

 

We have had to update our VF component to dynamically turn off the highlighting based on the number of items in the table, but we hope that is only a temporary solution.

Best Answer chosen by Admin (Salesforce Developers) 
TH53TH53

Great News - the performance issue related to the table highlighting has been resolved with last night's patch update (March 24, 2010).

 

Thanks Stephan and the salesforce dev team!

All Answers

TehNrdTehNrd
I can confirm this behavior with FF3.6 and IE8. The only browser this doesn't seem to affect is Chrome.
TH53TH53

Thanks for the confirmation. I appreciate your efforts. We found the same to be true with the various browsers. Chrome is the only one that doesn't seem to have this issue.

 

I will file a case and update this post with the outcome.

TehNrdTehNrd

Here is a public page that shows this behavior:

 

http://tehnrddemos-developer-edition.na7.force.com/highlightPerformance

 

 

TehNrdTehNrd

And here is the exact same page on the old UI. There is clearly some performance issues.

 

http://f5-developer-edition.na4.force.com/highlightold

TH53TH53

Thank you TehNrd for creating and posting the example. It will be tremendously helpful in getting support to address the issue.

 

I have created a Case: 03380689.

 

I'll post updates when I hear back from tech support.

stephanstephan

FYI using onrowmouseover and onrowmouseout to change the color of a row like this will never scale for large tables.

 

A much more performant approach would be to do this via CSS. Add the following style block to your page:

 

<style type="text/css"> tr.dataRow:hover { background-color: #e3f3ff; } </style>

 

And then remove from your dataTable any on* attributes where you're doing stuff like "if (window.hiOn){hiOn(this);}"

I'm not sure what may have changed with the new skin to cause your original implementation to degrade, but I'm frankly surprised it worked before for large tables. Doing this with CSS is the correct approach.

 

...stephan

TehNrdTehNrd

Uhh... could you pass off that tidbit of knowledge to the salesforce CSS team. Those demo pages above are using the out of the box salesforce CSS/javascript. I have done nothing custom to them. Below is the code.

 

<apex:page controller="highlightPerformance">
<apex:pageBlock >
<apex:pageBlockTable value="{!opps}" var="o">
<apex:column value="{!o.Name}"/>
<apex:column value="{!o.StageName}"/>
<apex:column value="{!o.Closedate}"/>
<apex:column value="{!o.Type}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>

public class highlightPerformance {
List<Opportunity> opps;

public List<Opportunity> getOpps() {
if(opps == null){
opps = new List<Opportunity>();
for(Integer i = 0; i < 200; i++){
opps.add(new Opportunity(Name = 'Opp name'+i, StageName = 'stagename', CloseDate = system.today(),type = 'type'));
}
}
return opps;
}
}

I hope this can be resolved as it feels to the user like the whole app is slowing down.

Message Edited by TehNrd on 03-10-2010 03:14 PM
stephanstephan

I didn't realize that this was how the table was behaving OOTB -- I thought it was a custom impl. Yes, that's pretty bad.

 

We'll need to fix this, likely in a patch. Stay tuned...

TehNrdTehNrd
Excellent! Thanks for understanding!
TH53TH53

Many thanks to TehNrd for your response and valuable information. We too were using the OOTB code and investigated the HTML that was generated - so that is why I mentioned the onmouseover and onmouseout. Sorry to add the unnecessary level of confusion. In response to the slow performance, we had to adjust the dataTable definition to dynamically add the selection code based on the number of items in the list. So, for right now, small lists get selection; large lists get no selection.

 

Thanks also to Stephan for chiming in and following up with the Salesforce.com engineers. I did get a phone call about an hour ago from the person handling the case I created for this issue. The good news is that the engineers are all over it and have recognized that it is an issue. From what they say, the item will be 'triaged' which I hope means that it will be fixed. Because of safe habor stuff, they can't reveal if and when it will be fixed. If I get any more information regarding my case and the release of a fix, I will be sure to post it here.

 

Thanks everyone!

TehNrdTehNrd

This isn't just related to row highlight peformance. There are some major javascript performance issues with the new UI as a whole: Major javascript performance issues with the new UI

 

I'm about to open a seperate case related to javascript performance.

 


TH53TH53

Thanks for continuing to push the issue and to dig deeper into the problem. Your efforts are greatly appreciated!

 

My case related to this particular issue has not been updated yet so I do not have any additional information to post.

stephanstephan

Hey guys --

 

I just checked the status of the bug, and a fix is scheduled to roll out in next week's patch (3/24). Please let me know if this resolves your issue.

 

...stephan

TehNrdTehNrd

Hey Stephen,

 

Thanks for keeping us updated. It is incredibly helpful.

 

Is the fix in question related to only the highlighting performance issue or a larger over arching javascript issue?

 

EDIT: Just saw your comment on the other post. I suppose there is a chance this change could fix the other issues but I'll try to isolate the issue even more.

Message Edited by TehNrd on 03-19-2010 10:25 AM
TH53TH53
Great News - thanks a ton!
TH53TH53

Great News - the performance issue related to the table highlighting has been resolved with last night's patch update (March 24, 2010).

 

Thanks Stephan and the salesforce dev team!

This was selected as the best answer
TehNrdTehNrd

Yup, this issue looks resolved. Unfortunetly this didn't fix the issues I am encountering in this thread:

 

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=22627

Message Edited by TehNrd on 03-25-2010 08:45 AM
TH53TH53

Unfortunately it didn't fix the flashing problem either:  http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=22592

 

stephanstephan

The two other issues you've noted are still under investigation. No ETA on a fix at this point, but will keep you updated...

 

...stephan

TehNrdTehNrd
Thanks for the updats. Even the smallest status updates and very helpful.