I am having performance issues in IE and using the browser profiler, I narrowed it down to this:
$tbody.find('> tr:not(.t-grouping-row,.t-detail-row)')
What does this exactly mean and any ideas on how to rewrite this so it performs better in IE (maybe pure Javascript if it makes sense)?
Alright, let’s see together step by step what this means:
$tbodyis a variable. It was probably defined a little before that. I guess by its name that it means “the tbody tag of a table”.>means “all the children”.tr:not(.t-grouping-row,.t-detail-row)'means “all the tr that DON’T have the classes “t-grouping-row” and “t-detail-row”.So your selector is “find all the TR in this tbody that don’t have the classes “t-grouping-row” and “t-detail-row”.
A better selector would be the following:
But this would be just a little better, and still bad. You should review your HTML, see what you want and use a simpler selector such as
$('.class', $tbody).