function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
freemanfreeman 

AJAX calls 10 times slower in IE than Firefox

I have a s-control to get data from Salesforce.com and process them, then posted on the web site. Here is the high level of my code:
 
var contents = "";
for(var i=0;i<queryResult.records.length;i++)  {
 
  var dynaBean = queryResult.records[i];
 
  var field_1 = dynaBean.get("FIELD_1");
  var field_2 = dynaBean.get("FIELD_2");
  ...
   var field_n = dynaBean.get("FIELD_n");
 
  contents += field_1 + field_2 + ... + field_n + "<br>";
 
}
 
document.getElementById("elment_id").innerHTML = contents;
 
This code runs perfectly fine in Firefox, but is 10 times (if not more) slower when using MS internet explorer.
 
Anybody has similar experience on this, please give me some advice on how I could make it run faster in IE.  I have to get it work in IE, since IE is our company's authorized browser and FF is not.


Message Edited by freeman on 09-03-2006 04:14 AM

DevAngelDevAngel
This sounds like an IE memory leak.  Does a new instance of IE run faster than one thats been around for a while?  When including the toolkit, don't use ?browser=true unless you really need something from that library.  That library is probably leaky.
freemanfreeman
Dave,
     Thanks for the reply. 
 
     In my testing, I did not see any major speed difference between a fresh instance of the IE browser and the one hanging around for a while.  This issue has been driving us crazy, because we are looking at an application release in early October. 
 
     We are pretty sure that IE is slower in handling the following calls than Firefox:
            var dynaBean = queryResult.records[i];
            var field_1 = dynaBean.get(FIELD_1);
            ...
 
     I also did a test without (?browser=true) when include the toolkit and seems like no luck on this either.
 
Thanks,
Freeman
zachzach
Yeah, IE is quite a lot slower no matter what... Especially when looping and setting longish HTML strings.  Generally, I've found IE to be about twice as slow as Firefox.
SteveBowerSteveBower

I had a long update job which I too found took 6-8 times longer on IE than Firefox.  For me, this wasn't a big problem because it was an administrative task which could be run using Firefox, but I believe IE is *substantially* slower.  I think it's in memory allocation and garbage collection, but don't know.  If you're finding that your memory profile grows throughout the run, try to "hint" the gc to clean some things up along the way and keep the footprint small.  - Steve.