Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
I'm surprised you're finding modifying one DOM node in an XML DOM to be slow.
Well, it's more like dozens or hundreds of DOM nodes. With three or more levels of looping.
How do you measure its performance?
With JavaScript alerts before and after all the looping.
With hundreds of nodes I could imagine XSLT might be faster, but I'd think JavaScript would be pretty fast too.
What browser are you using to measure performance? Chrome has some profiling tools that might help you figure out if you can make the JavaScript code fast enough.
What browser are you using to measure performance? Chrome has some profiling tools that might help you figure out if you can make the JavaScript code fast enough.
I'm using IE 8. The application is IE-only. We've done a fair amount of JavaScript optimization already.
JavaScript on IE 9 is supposed to be faster (or was that 8?) but our client hasn't upgraded to IE 9 yet.
IE 9 is supposed to have a better Javascript engine.
I'm afraid I don't know anything about XSLT.
Does the version of Javascript you're using have E4X? [link]
I'm afraid I don't know anything about XSLT.
Actually, I got the xsl transformations working. The problem I'm having is the result of an xsl transformation is not a JavaScript object but just text (XML, in this case.) So I pull the result into a DOM DocumentFragment and then I try to do an AppendChild of the DocumentFragment into a different XML object, but that doesn't work.
Does the version of Javascript you're using have E4X? [link]
That sounds cool. But it's not supported by IE.
(I don't know why the consultants who developed the application made it IE-only. I think the client told them that IE only was OK, so the consultants used a bunch of IE-only XML functionality.)
What are the symptoms of the failure?