Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE 7 slow rendering

Status
Not open for further replies.

jez

Programmer
Apr 24, 2001
370
VN
Hi,

I have some large drop down lists in a form page. When i say large i mean 2000+ in some. (yeah i know, but that is what they want).

There is also about 10 of these drop downs in the whole form.
To help things along, i am getting them with AJAX.

Things are fine in firefox and it shows the communication time is pretty quick in firebug.

My problem is that IE7 appears to hang as it takes so long to render the drop down lists. They appear but when you click on them everything stops for about a minute.

My backend script is producing the full "<select "... string and then putting that in a div with innerHTML.

Can anyone suggest ways i can do this to make it work better for IE?
I am triggering all the population requests onLoad, so they are all running at the same time, would sequentially populating these make things better and if so would i have to try and track the readystate of each to trigger the next?

I have tried googling for answers but if anyone knows of a good website to find advanced ajax techniques for these kind of issues, i would be very grateful.

Thanks in advance.

Jez
 
You mention that your backend script is producing the full "<select..." string ... so why not have the page produce the lists on the server instead of waiting for the page to load, and then loading more information?

IE is still the slowest (in my opinion) for loading Javascript; I recall reading that one of the big improvements in Firefox is the ability to execute Javascript faster than most, if not all, other browsers ...

Greg
 
Hi, thanks for the response.
Why not populate them on the server? this was due to the amount of data they would have, for instance if one select was a client list then it may have thousands of items in it.

Also the people who this was for wanted a form that repopulated itself based on filters.

There was a number of ways to achieve the form they wanted, but to get all the functionality, i went for AJAX.

The speed of IE in this was down to its terrible DOM handling, it simply doesn't traverse the DOM in an acceptable way for this day and age. I know this was something being addressed in IE 7 and i think it has improved, but this work for IE6 as it was a corporate who didn't want to rewrite all their intranet activex stuff.
 
I hear you regarding the corporate measures. Welcome to the nightmare. :p

If I understand right, the form repopulates select boxes based on filters ... wouldn't at least one select field have to be populated first to provided the users something to filter? Or do you have another mechanism for the first filter the users choose?

Something else you may want to consider: if the data in the other select boxes doesn't change very often, you may want to incorporate this data into a JSON array (or XML, but it's a bit slower than a JSON array); much faster to pull a small text file from the network than querying the database for data that rarely changes.

Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top