I use jQuery 1.4 for AJAX, MVC on the server side. Everything works fast on the local computer. Tables with data are compiled and sent as HTML documents (I’m testing the system with large tables, over 100KB). When I download the same page through the internet, everything works 5-10 times slower or is simply pending.
I checked Forefox debugger. AJAX sent the query and received the data quickly (I can see the received response with the correct data). But then it inserts the data in DOM very slowly, the following instruction works particularly slowly: $("#oldtable").replaceWith( newtable ); and empty() It works extremely slowly in IE6,8 (3 sec on local machine and about 1 min through the internet). I delete the data from DOM as one object and insert the whole table. There are no errors in the inserted html code.
Please could you recommend how to make it work faster? Probably I should use another library, such as Prototype. I can’t understand the following: Javascript is executed on the client’s side, the data is already uploaded. The computer is the same. Why does execution time differ so much? Thank you, Igor