javascript - Performance improvement of page where million records are present -


i need suggestion how improve performance of application, i'm developing mvc 3 asp.net application. controller , i'm pulling 50,000 records of type string, items i.e 50,000 added html div dynamically using jquery.

   $(div).append("<input type='radio' name='reporttype'     id='" + item.item1 + "' value = '" + item.item2 + "'/>" + item.item1 "); 

i see there considerable amount of time taken while adding above radio button parent control i.e html div

the parent html div has check box, on checking that, child box must selected. see there considerable amount of time checking items

all these items in scroll viewer, there way improve user experience, loading data on scroll basis thing data virtualization of silverlight in html 5.

i check items , drag on part of page, make browser non responsive mode. can provide me best user experience of these many records improve query performance

you should create documentfragment , add nodes there. , after finish add documentfragment dom. also, it's more efficient use createelement use strings. there lot of jsperf tests prove , there can find ways in efficient way.

to prevent browser freezing long period of time, should break iteration in batches of...1000 item (pure guess). , call function many times need finish job. keep counter outside it. call settimeout(rendermore, 0). @ least keep window freezing.

depending on ui , workflows, there might other improvements can apply. didn't provide info that.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -