<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: JavaScript optimization Part 1: Adding DOM elements to document</title>
	<atom:link href="http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/feed/" rel="self" type="application/rss+xml" />
	<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/</link>
	<description>In my blog I'll try to describe about interesting technologies, my discovery in IT and some useful things about programming.</description>
	<lastBuildDate>Tue, 29 Dec 2009 10:34:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: mascon</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-235143</link>
		<dc:creator>mascon</dc:creator>
		<pubDate>Thu, 18 Mar 2010 16:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-235143</guid>
		<description>array[idx++]=
еще делают так, array[array.length]=
проверенно, работает быстрее чем .push
а склеивание строк с помощью отератора += тормазит не только в JS...</description>
		<content:encoded><![CDATA[<p>array[idx++]=<br />
еще делают так, array[array.length]=<br />
проверенно, работает быстрее чем .push<br />
а склеивание строк с помощью отератора += тормазит не только в JS&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abadonna</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-234536</link>
		<dc:creator>Abadonna</dc:creator>
		<pubDate>Thu, 18 Mar 2010 16:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-234536</guid>
		<description>Для IE7 метод innerHTML не прокатывает для вставки &lt;option&gt; в &lt;select&gt;. Обрезается первый открывающий тэг &lt;option&gt;, в результате ни один из элементов списка не отображается.</description>
		<content:encoded><![CDATA[<p>Для IE7 метод innerHTML не прокатывает для вставки &lt;option&gt; в &lt;select&gt;. Обрезается первый открывающий тэг &lt;option&gt;, в результате ни один из элементов списка не отображается.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sunnybear</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-195764</link>
		<dc:creator>sunnybear</dc:creator>
		<pubDate>Thu, 18 Mar 2010 06:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-195764</guid>
		<description>

&lt;code lang=&quot;javascript&quot;&gt;array.push&lt;/code&gt;

можно заменить на

&lt;code lang=&quot;javascript&quot;&gt;array[idx++]=&lt;/code&gt;

(ага, читаем Lecompte) -- будет еще быстрее :)</description>
		<content:encoded><![CDATA[<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">array.<span style="color: #660066;">push</span></div></td></tr></tbody></table></div>
<p>можно заменить на</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">array<span style="color: #009900;">&#91;</span>idx<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span></div></td></tr></tbody></table></div>
<p>(ага, читаем Lecompte) &#8212; будет еще быстрее :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: efreeti</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-132944</link>
		<dc:creator>efreeti</dc:creator>
		<pubDate>Thu, 18 Mar 2010 16:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-132944</guid>
		<description>BTW rest of your articles are also only connected to HTML/DOM/CSS/JS combination and not JS itself. I think it&#039;s incorrect to name your article this way. Aren&#039;t there quite useful topics like optimization of lookups, state pattern for avoiding if statements, etc. that really concern JS coding practices?</description>
		<content:encoded><![CDATA[<p>BTW rest of your articles are also only connected to HTML/DOM/CSS/JS combination and not JS itself. I think it&#8217;s incorrect to name your article this way. Aren&#8217;t there quite useful topics like optimization of lookups, state pattern for avoiding if statements, etc. that really concern JS coding practices?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: efreeti</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-132937</link>
		<dc:creator>efreeti</dc:creator>
		<pubDate>Thu, 18 Mar 2010 15:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-132937</guid>
		<description>I don&#039;t quite understand what it has to do with JavaScript optimization? The only JavaScript optimization I see here is using array for string concat. The rest you were talking about is optimization of interaction with DOM ( and to tell you honestly nothing very new). Still although this method is more descriptive than using DOM methods for creation of JS, it is still ugly. In the end HTML markup should never be bundled inside the JS code, it&#039;s already a bad practice - visualization should be separate from the logic. According to current state of things and MVC HTML is a part of the view, which is why you should not mess its creation with control (JS). So such things as HTML template should be defined outside the script. There are different ways of implementing such templating mechanism, some frameworks support such options. 
You can say that you don&#039;t have time for that and you fine with this solution. In case of small  script/hack you will be right. But in any case this is far from unobtrusive JavaScript or good practise in case of larger development.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t quite understand what it has to do with JavaScript optimization? The only JavaScript optimization I see here is using array for string concat. The rest you were talking about is optimization of interaction with DOM ( and to tell you honestly nothing very new). Still although this method is more descriptive than using DOM methods for creation of JS, it is still ugly. In the end HTML markup should never be bundled inside the JS code, it&#8217;s already a bad practice &#8211; visualization should be separate from the logic. According to current state of things and MVC HTML is a part of the view, which is why you should not mess its creation with control (JS). So such things as HTML template should be defined outside the script. There are different ways of implementing such templating mechanism, some frameworks support such options.<br />
You can say that you don&#8217;t have time for that and you fine with this solution. In case of small  script/hack you will be right. But in any case this is far from unobtrusive JavaScript or good practise in case of larger development.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: melco</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-86336</link>
		<dc:creator>melco</dc:creator>
		<pubDate>Thu, 18 Mar 2010 10:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-86336</guid>
		<description>
Can&#039;t agree about Opera is the fastest browser in the world. Try out Safary and see that it&#039;s at least two times faster than other.</description>
		<content:encoded><![CDATA[<p>Can&#8217;t agree about Opera is the fastest browser in the world. Try out Safary and see that it&#8217;s at least two times faster than other.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DrGreen</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-70110</link>
		<dc:creator>DrGreen</dc:creator>
		<pubDate>Thu, 18 Mar 2010 11:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-70110</guid>
		<description>Thanks for this article, it save my day!
Thanks again!</description>
		<content:encoded><![CDATA[<p>Thanks for this article, it save my day!<br />
Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sören</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-67980</link>
		<dc:creator>Sören</dc:creator>
		<pubDate>Thu, 18 Mar 2010 08:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-67980</guid>
		<description>thanx for the article! interesting - i never thought of an array and &quot;push&quot; to do this. btw &quot;push&quot; is not compatible with ie5.0 if you care about that browser.
but one important thing - i think your ie6 install must be totally f***** up. i realy could not reproduce your measurements...
on my machine for ie6 (in test-order):
188, 125, (too long ;-), 94, 78
to get a comparison, ff1.5 takes 150ms for the first test here... so?!
to use innerHTML was also the recommendation of PPK (Peter Paul Koch), after his testings way back.
hm, there is clearly something wrong.</description>
		<content:encoded><![CDATA[<p>thanx for the article! interesting &#8211; i never thought of an array and &#8220;push&#8221; to do this. btw &#8220;push&#8221; is not compatible with ie5.0 if you care about that browser.<br />
but one important thing &#8211; i think your ie6 install must be totally f***** up. i realy could not reproduce your measurements&#8230;<br />
on my machine for ie6 (in test-order):<br />
188, 125, (too long ;-), 94, 78<br />
to get a comparison, ff1.5 takes 150ms for the first test here&#8230; so?!<br />
to use innerHTML was also the recommendation of PPK (Peter Paul Koch), after his testings way back.<br />
hm, there is clearly something wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erhan</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-49615</link>
		<dc:creator>Erhan</dc:creator>
		<pubDate>Thu, 18 Mar 2010 22:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-49615</guid>
		<description>Great article. Thank you very much.</description>
		<content:encoded><![CDATA[<p>Great article. Thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Скорость работы браузеров &#187; Блог FX&#8217;а</title>
		<link>http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-35161</link>
		<dc:creator>Скорость работы браузеров &#187; Блог FX&#8217;а</dc:creator>
		<pubDate>Thu, 18 Mar 2010 13:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/javascript/javascript-optimization-part-1-adding-dom-elements-to-document/#comment-35161</guid>
		<description>[...] После прочтения статьи Дмитрия Штефлюка про скорость работы javascript в разных браузерах я очень удивился - мой любимый Firefox оказался чуть ли не самым медленным браузером (после IE 6.0). Решил проверить самостоятельно на его тестовом примере и заодно сравнить скорость альфа-версии Firefox 3.0 с второй версией. А заодно установил Opera 9.20, которая вот вышла буквально вчера, чтобы удостовериться в ее быстроте. [...]</description>
		<content:encoded><![CDATA[<p>[...] После прочтения статьи Дмитрия Штефлюка про скорость работы javascript в разных браузерах я очень удивился &#8211; мой любимый Firefox оказался чуть ли не самым медленным браузером (после IE 6.0). Решил проверить самостоятельно на его тестовом примере и заодно сравнить скорость альфа-версии Firefox 3.0 с второй версией. А заодно установил Opera 9.20, которая вот вышла буквально вчера, чтобы удостовериться в ее быстроте. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
