tag:blogger.com,1999:blog-4222197394079314848.post4532096729651916242..comments2023-05-10T02:34:45.071-05:00Comments on Mark A. Ziesemer: .innerHTML and .innerText slow performance under Internet ExplorerMark A. Ziesemerhttp://www.blogger.com/profile/12752422620777325409noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-4222197394079314848.post-54441777044696990452014-06-17T03:30:43.959-05:002014-06-17T03:30:43.959-05:00Because of this post I was scared so much !!!
But...Because of this post I was scared so much !!!<br /><br />But it presents false image how innerText is working. Because in "normal" circumstances you will never have more than 1k text nodes even in very big text document so its working like a charm everywhere.<br /><br />I'm doing performance search in google before all major work (because I have to support IE8) and this example was Tato szachistyhttps://www.blogger.com/profile/12391011177731968517noreply@blogger.comtag:blogger.com,1999:blog-4222197394079314848.post-4461982935696361552012-02-02T08:03:50.196-06:002012-02-02T08:03:50.196-06:00Good post man! Really helped me out. Here is helpe...Good post man! Really helped me out. Here is helper function if someone is still struggling with this.<br /><br />http://demonicskull.blogspot.com/2012/02/jquery-text-html-poor-performance-on-ie.htmlAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4222197394079314848.post-59746749664853865152010-07-03T12:06:50.005-05:002010-07-03T12:06:50.005-05:00Hey: Quirksmode.org has a very interesting page a...Hey: Quirksmode.org has a very interesting page about innerHTML vs DOM manipulation (in terms of speed).<a href="http://www.quirksmode.org/dom/innerhtml.html" rel="nofollow">Take a look.</a> Although the numbers are out of date, it is easy to run your own tests with each browser.<br /><br />.innerHTML is frequently one of the slowest operations I find in IE7. I'll have to try .nodeValue. Toby Teelhttps://www.blogger.com/profile/09506394404080007136noreply@blogger.comtag:blogger.com,1999:blog-4222197394079314848.post-78889099821319507422009-07-28T12:42:43.442-05:002009-07-28T12:42:43.442-05:00"My heart speaks" - appending to .innerH..."My heart speaks" - appending to .innerHTML, and doing so in a loop, certainly will certainly expose this performance issue. Please investigate using the <a href="https://developer.mozilla.org/en/Gecko_DOM_Reference" rel="nofollow">DOM methods</a>, e.g. <a href="https://developer.mozilla.org/En/DOM/Node.appendChild" rel="nofollow">.appendChild</a> instead.<br /><br />sheeba - Are you Mark A. Ziesemerhttps://www.blogger.com/profile/12752422620777325409noreply@blogger.comtag:blogger.com,1999:blog-4222197394079314848.post-39233187888144592542009-07-28T02:01:04.867-05:002009-07-28T02:01:04.867-05:00.innerText is increasing the cpu usage in my appli....innerText is increasing the cpu usage in my application in IE.. I am using .innerText to set the text for the labels...is there another alternative to set values for labels...very urgent issue...help appreciatedUnknownhttps://www.blogger.com/profile/03865977792012704670noreply@blogger.comtag:blogger.com,1999:blog-4222197394079314848.post-5411968387122371462009-01-28T09:51:00.000-06:002009-01-28T09:51:00.000-06:00I am also pretty much facing similar issue. I have...I am also pretty much facing similar issue. I have large chunk of HTML generated out of XSL transformation and when I use innerHTML property to set the generated HTML to DIV, it takes long time.<BR/>document.all[destination].innerHTML += workspaceHtml;<BR/>I am tied to IE..any IE specifc solution would work for me.My heart speakshttps://www.blogger.com/profile/10092247310687846844noreply@blogger.comtag:blogger.com,1999:blog-4222197394079314848.post-33235911537211506332008-12-24T10:21:00.000-06:002008-12-24T10:21:00.000-06:00Chris - what do you need more detail on? Does .no...Chris - what do you need more detail on? Does .nodeValue not work for you?Mark A. Ziesemerhttps://www.blogger.com/profile/12752422620777325409noreply@blogger.comtag:blogger.com,1999:blog-4222197394079314848.post-3851126738244330792008-10-17T13:12:00.000-05:002008-10-17T13:12:00.000-05:00I've been having problems with this exact same thi...I've been having problems with this exact same thing, could you explain the workaround in a bit more detail?<BR/><BR/>FF/Safari/Google Chrome insert the HTML content almost instantly, but IE takes several seconds longer...Anonymousnoreply@blogger.com