In general, if you are performing a critical task, do not use jQuery. Each $('.classname') performs at least 20 jQuery lines, and especially in the case of IE8, as well as a ton of its own iteration through the document.
There is a limit to script lines executed in IE8. By default, it executes a million lines, then the user asks if he wants to continue the script. This limit is controlled by the registry, but in the case of a web application it is not advisable to increase the value of the course.
In IE8, rendering speed is also a problem.
- Use minimal style overall
- Try not to set
innerHTML / innerText , use createElement() and / or createTextNode() and appendChild() and / or insertBefore() instead. - Avoid inline styles, change class names instead, or even use direct manipulation of CSS rules.
- Cache elements are used to the maximum when using
getElementsBy/Tag/Class/Name() . - Use the collected collections of
table.rows and table.rows[n].cells , where possible. - Suppose that only part of the table is shown, it makes rendering faster.
Teemu source share