<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Nothing fancy - All Comments</title><link>http://weblogs.asp.net/alexeigorkov/default.aspx</link><description>ASP.NET, JavaScript, Ajax, CSS </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Debug Build: 20510.895)</generator><item><title>re: Firefox 3. XSLT Processing Engine bug?</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/06/21/firefox-3-xslt-processing-engine-bug.aspx#6376898</link><pubDate>Tue, 08 Jul 2008 17:06:05 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6376898</guid><dc:creator>Veacks</dc:creator><description>&lt;p&gt;PS: the bug is in the transformation, not in javascript CODE. &lt;/p&gt;
&lt;p&gt;I think there is something that firefox do not interpret any more, I dont kow what is it. &lt;/p&gt;
&lt;p&gt;The other XSLs are Ok, thre is just one who dont work.&lt;/p&gt;
&lt;p&gt;All have multi imports, it can&amp;#39;t be the problem.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6376898" width="1" height="1"&gt;</description></item><item><title>re: Firefox 3. XSLT Processing Engine bug?</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/06/21/firefox-3-xslt-processing-engine-bug.aspx#6376796</link><pubDate>Tue, 08 Jul 2008 16:40:41 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6376796</guid><dc:creator>Veacks</dc:creator><description>&lt;p&gt;Hello AGZ, I also have a bug in XSL which did not exist in FireFox 2. &lt;/p&gt;
&lt;p&gt;Did you found a solution or informations ?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6376796" width="1" height="1"&gt;</description></item><item><title>re: Firefox 3. XSLT Processing Engine bug?</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/06/21/firefox-3-xslt-processing-engine-bug.aspx#6357176</link><pubDate>Fri, 04 Jul 2008 09:32:33 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6357176</guid><dc:creator>AGS777</dc:creator><description>&lt;p&gt;Egor,&lt;/p&gt;
&lt;p&gt;Unfortunately the problem/solution referred to in your comment is completely irrelevant to the issue I indicated in the post.&lt;/p&gt;
&lt;p&gt;The issue is not related to XSLT file path in any case and, as it is shown in the post, the processing does not fail, the problem actually is in the erroneous result of the processing. &lt;/p&gt;
&lt;p&gt;Thanks for you reply though.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6357176" width="1" height="1"&gt;</description></item><item><title>re: Firefox 3. XSLT Processing Engine bug?</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/06/21/firefox-3-xslt-processing-engine-bug.aspx#6356693</link><pubDate>Fri, 04 Jul 2008 07:00:35 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6356693</guid><dc:creator>Egor</dc:creator><description>&lt;p&gt;This worked for me:&lt;/p&gt;
&lt;p&gt;1) type about:config in the address bar&lt;/p&gt;
&lt;p&gt;2) change security.fileuri.strict_origin_policy to false&lt;/p&gt;
&lt;p&gt;Taken from&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://forums.mozillazine.org/viewtopic.php?f=25&amp;amp;t=670995"&gt;forums.mozillazine.org/viewtopic.php&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6356693" width="1" height="1"&gt;</description></item><item><title>net framework 1 1</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/05/17/net-1-1-service-pack-1-and-page-registerstartupscript.aspx#6201476</link><pubDate>Mon, 19 May 2008 15:14:16 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6201476</guid><dc:creator>net framework 1 1</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;net framework 1 1&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6201476" width="1" height="1"&gt;</description></item><item><title>re: Array.prototype.slice vs manual array creation</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/02/18/array-prototype-slice-vs-manual-array-creation.aspx#6200661</link><pubDate>Sun, 18 May 2008 16:33:25 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6200661</guid><dc:creator>AGS777</dc:creator><description>&lt;p&gt;Isaac,&lt;/p&gt;
&lt;p&gt;Yes, I know that premature optimization is the root of all evil in programming. But, as I wrote in the initial post on the subject, actually I wanted to use Array.prototype.slice &amp;nbsp;to optimize existing code which is at the moment is implemented as a manual iteration through &amp;nbsp;arguments object members. And it turned out, to my surprise, that there is no reason to do it, since there are no any tangible benefits other than forcing other members of our team to burn a few additional brain cycles to understand otherwise plain and simple code.&lt;/p&gt;
&lt;p&gt;And yes, I tried, without any hope, to pass Array.prototype.slice as a parameter to the function. Nothing changed. &lt;/p&gt;
&lt;p&gt;So, thank you once again for your replies, but to my mind we need someone with a knowledge of internal implementation of the method in major browsers to answer whether my expectations regarding performance of a native method had any grounds at all.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6200661" width="1" height="1"&gt;</description></item><item><title>re: Array.prototype.slice vs manual array creation</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/02/18/array-prototype-slice-vs-manual-array-creation.aspx#6200134</link><pubDate>Sun, 18 May 2008 01:38:28 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6200134</guid><dc:creator>Isaac Z. Schlueter</dc:creator><description>&lt;p&gt;That&amp;#39;s interesting.&lt;/p&gt;
&lt;p&gt;Looking up the global Array vs the global _slice should be about the same, so that makes sense. &amp;nbsp;What about passing a reference to Array.prototype.slice directly to the function so that it&amp;#39;s a parameter rather than a global var?&lt;/p&gt;
&lt;p&gt;One way that Array.prototype.slice is better than iteration, though, is that it&amp;#39;s less code. &amp;nbsp;In general, the fewer instructions you have, the less chance there is for bugs to creep in, and the more clear and maintainable the code is. &amp;nbsp;Early optimization is not usually a good idea, especially if it results in a less clean design.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6200134" width="1" height="1"&gt;</description></item><item><title>re: .NET Framework 1.1 Service Pack 1 and Page.RegisterStartupScript</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/05/17/net-1-1-service-pack-1-and-page-registerstartupscript.aspx#6200002</link><pubDate>Sat, 17 May 2008 22:19:55 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6200002</guid><dc:creator>Joe</dc:creator><description>&lt;p&gt;To be fair to MS, the documentation for RegisterScriptBlock does state that &amp;quot;The script blocks are not guaranteed to be output in the order they are registered.&amp;quot;.&lt;/p&gt;
&lt;p&gt;But I'd still define it as a bug (otherwise they wouldn't have fixed it) - it's worth remembering, thanks.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6200002" width="1" height="1"&gt;</description></item><item><title>re: Array.prototype.slice vs manual array creation</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/02/18/array-prototype-slice-vs-manual-array-creation.aspx#6199853</link><pubDate>Sat, 17 May 2008 19:55:12 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6199853</guid><dc:creator>AGS777</dc:creator><description>&lt;p&gt;Issac,&lt;/p&gt;
&lt;p&gt;Thank you for your reply. &lt;/p&gt;
&lt;p&gt;Are you sure that looking up global Array object and then looking up for its prototype property and then slice property of the prototype should be faster than looking up for the single global _slice variable? &lt;/p&gt;
&lt;p&gt;In fact this statement was intended to avoid such look ups. And I&amp;#39;ve seen this exact declaration in Dean Edwards&amp;#39; Base2 library. &lt;/p&gt;
&lt;p&gt;For what I can see from the test results (I tried to &amp;nbsp;increase number of iterations and number of arguments) - replacement of _slice to Array.prototype.slice gives more often than not some increase in time for the second variant.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also tried to increase number of arguments further and changed the code so that the result of the call is saved as you suggested and got approximately the same results. I don not already have the same browsers that were used during my first tests. All of them (Firefox, Safari, Opera and even IE) released newer versions since then but as I said the result is pretty much the same, i.e. there is no any performance benefits in using slice vs manual iteration through arguments members as I expected.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6199853" width="1" height="1"&gt;</description></item><item><title>re: Array.prototype.slice vs manual array creation</title><link>http://weblogs.asp.net/alexeigorkov/archive/2008/02/18/array-prototype-slice-vs-manual-array-creation.aspx#6198968</link><pubDate>Sat, 17 May 2008 11:33:51 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6198968</guid><dc:creator>Isaac Z. Schlueter</dc:creator><description>&lt;p&gt;The reason why the slice method is slower in your example is probably because it's looking up the scope chain to find the global _slice object.&lt;/p&gt;
&lt;p&gt;Either replace the reference to the global _slice with Array.prototype.slice inside the function, or pass the slice reference into the function as an argument. &amp;nbsp;Scope chain lookups can be pretty slow.&lt;/p&gt;
&lt;p&gt;Also, looping through only three elements isn't that much. &amp;nbsp;Try generating an array of 1000 elements, and calling the functions with Function.apply, and then the difference may be more pronounced.&lt;/p&gt;
&lt;p&gt;Lastly, I've found some cases where the browsers are optimized to discard values that are not set to be assigned anywhere. &amp;nbsp;Instead of just calling fn(...), try doing var x = fn(...) so that it knows that it has to actually keep track of the return val.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6198968" width="1" height="1"&gt;</description></item></channel></rss>