See how I'm not punching him? I think I've grown.

Mal ,'Shindig'


Buffistechnology 3: "Press Some Buttons, See What Happens."

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!


Jon B. - Oct 03, 2012 9:18:12 am PDT #21141 of 25501
A turkey in every toilet -- only in America!

Is this something that jQuery could handle?

Sorry, that's well past the limits of my knowledge.


Rob - Oct 03, 2012 9:34:59 am PDT #21142 of 25501

This works but can be slow. Using the XSL transformation would (I think) increase performance.

I doubt it will increase performance. I'm surprised you're finding modifying one DOM node in an XML DOM to be slow. How do you measure its performance?


tommyrot - Oct 03, 2012 9:43:31 am PDT #21143 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.


Rob - Oct 03, 2012 10:59:32 am PDT #21144 of 25501

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.


le nubian - Oct 03, 2012 11:03:42 am PDT #21145 of 25501
"And to be clear, I am the hell. And the high water."

I love my Samsung tv.


tommyrot - Oct 03, 2012 11:10:34 am PDT #21146 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.


Gudanov - Oct 03, 2012 11:13:57 am PDT #21147 of 25501
Coding and Sleeping

IE 9 is supposed to have a better Javascript engine.


Rob - Oct 03, 2012 11:46:49 am PDT #21148 of 25501

I'm afraid I don't know anything about XSLT.


Tom Scola - Oct 03, 2012 11:48:50 am PDT #21149 of 25501
Remember that the frontier of the Rebellion is everywhere. And even the smallest act of insurrection pushes our lines forward.

Does the version of Javascript you're using have E4X? [link]


tommyrot - Oct 03, 2012 12:11:33 pm PDT #21150 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.