Quantcast
Viewing all articles
Browse latest Browse all 82110

Many tables on a single page - performance issue

Hi All,

On my page I render multiple tables. DataTables are optimized for many rows, but in a single table. In case of having multiple tables on a single page (e.g. 13) it can be quite slow I found two performance issue on IE 8/9 that could be easily fixed.

I.
Function
_fnBrowserDetect
can be very slow on IE 8/9. It does not cache the result, so if you have e.g. 13 tables on a single page it will be called 13 times and it can be huge performance issue. We could cash a result of this function somewhere.

II.
var oSettings = $.extend( true, {}, DataTable.models.oSettings, {
				"nTable":        this,
				"oApi":          _that.oApi,
				"oInit":         oInit,
				"sDestroyWidth": $(this).width(),
				"sInstance":     sId,
				"sTableId":      sId
			} );

Property sDestroyWidth is used only when bAutoWidth is true and only in the fnDestroy function.

but calculation of its default value is done always

"sDestroyWidth": $(this).width(),

On my page on IE 8/9 it takes some significant amount of time. I think it could be calculated only if it's needed.

Viewing all articles
Browse latest Browse all 82110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>