In comp.lang.javascript message <1179853283.966259.117@m36g2000hse.go
oglegroups.com>, Tue, 22 May 2007 10:01:24, j.pre@gmail.com posted:
> Then I tried joining all the contacts up in to one
>huuuuuuuge string and this was a little faster but the browser still
>hangs noticeably.
Different ways of creating a huge string have different speeds.
S = "" ; for (J=0; J<30000; J++) S += " " + J + "\n"
A = [] ; for (J=0; J<30000; J++) A.push(" " + J + "\n") ; A = A.join("")
I find the second four times faster in IE6 XP sp2.
Something on that would be worth having in the FAQ, except that it's
much more often answered than asked.
It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.