c# - Properly Formed HTML as String in Div on .Net Web Form is Rendering Well Beyond Extremely Slow -
i have evidently inadvertently created beast appreciate ideas on alternatives or how might identify problem. (this c# .net 3.0 app.)
i have master page contains 4 textboxes. when user enters text in 1 of text boxes triggers javascript call refresh search results page inside iframe on master page.
when search results page loads call made property '<%=results %>' calls search function. search function retrieves xml string sql server database, loads xmldocument, , transforms output xlst stringwriter property "results".
the xslt output table 24 columns, javascript on row click highlighting row, , links on each row going new screen edit selected record.
it works in timely fashion 100 rows. when reaches 200 table rows lag time becomes noticable. @ 500 rows takes 12 - 15 seconds render, , @ 1000 rows takes 90 seconds. there 3000 records possible , user able have option return rows sorting, analyzing, , possibly exporting; so, need better mouse trap.
the delay entirely in browser rendering internet explorer 8.0. google chrome takes approximately 7 seconds 1000 rows. also, have used additional test code write html output xslt transform file ensure output formed , there no problems noted. have navigated saved file on local machine , 1000 rows in fresh browser window , takes approximately 5 seconds load browser; so, @ loss why takes 90 seconds load directly web form in iframe.
does have clue might happening , how resolve problem(s)? there better way crack nut? better if saved xslt output file , loaded iframe? or maybe should scrap xslt , use response.write loop?
i believe killed problem old, unoptimized solution.
first of all, point fact of why use iframe approach if ajax modern, supported , optimal solution?.
server-processing should done service - maybe windows communication foundation 1 http binding , hosted in internet information services - , can use json data contract serializer. that's returned data going reduced , light-weight communication, dramatically-incresing network performance/usage.
working json makes easier. you'll have results javascript objects, translating json result run-time-created dom elements easy: iterate results , use jquery in order create table rows (or can switch asp.net 4.0 , take advantage of client-side data binding (http://msdn.microsoft.com/en-us/magazine/cc972638.aspx) , make easier (i don't know if can that, it's suggestion!!).
calling wcf json-enabled service jquery or other javascript client api easy , it'll save development time , it'd incredibly increase application performance , responsiveness.
here you've asp.net 3.5 example of how work wcf, json , client-side service calls. http://dotnetslackers.com/articles/ajax/json-enabledwcfservicesinaspnet35.aspx
Comments
Post a Comment