From the sound of it, you're receiving data back from the server, 
generating html, then passing that html to .append() right? I'd try 
using standard dom methods (i.e. document.createElement('td')), and 
avoid converting the strings at all.

When jQuery converts an html string, it does a bunch of munging (have a 
look at the jquery.clean function) to make sure that the elements you 
get back match the elements you put in. Most of the munging is to get 
rid of extra elements IE adds to tables, so it's much, much faster 
(especially for tables) to just start with a DOM node in the first place 
if at all possible.

Cheers,
Luke

Josh Bush wrote:
> Well, I feel stupid.  it's not the join that's taking so long, it's
> the $( "really big DOM string with 1,000 rows and 3 columns") that
> takes so dang long on IE7. After all of this rambling, does anyone
> have any options for me to try?
> 
> Sorry, for the self-dialog here.
> -Josh
> 
> On Aug 7, 8:42 pm, Josh Bush <[EMAIL PROTECTED]> wrote:
>> Well, FF2 performance is great at 500-600ms.  IE7 is struggling with a
>> join of 1,000 elements to the tune of 70,000 ms!
>> Each array element contains a string, something like '<tr><td>1</
>> td><td>2</td></tr>'
>>
>> Any advice is greatly appreciated.  I still feel like a noob in
>> javascript sometimes. :(
>>
>> Josh
>>
>> On Aug 7, 3:40 pm, Josh Bush <[EMAIL PROTECTED]> wrote:
>>
>>> I'm working on a project that makes a web service call and pulls back
>>> data.  Sometimes that data can be 1,000ish rows.  What is the fastest
>>> way that I can create those rows?  Right now I'm just doing string
>>> concatenation to make HTML and passing that to the .append method.  I
>>> read the other day where someone(Klaus?) said that array.join was a
>>> faster way to do string concatenation.
>>> I'd like to avoid the string concats all together if there is a faster
>>> method.  I'm just poking around for ideas.
>>> Thanks
>>> Josh
> 

Reply via email to