<?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: Startup: Backward Constructors</title>
	<atom:link href="http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/</link>
	<description>Taras&#039; blog on Snappy, Startup, Telemetry and other Firefox peroformance matters</description>
	<lastBuildDate>Tue, 27 Nov 2012 16:50:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Miguel</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-28112</link>
		<dc:creator>Miguel</dc:creator>
		<pubDate>Fri, 18 Jun 2010 14:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-28112</guid>
		<description><![CDATA[That Michael Meeks has a sharp eye.]]></description>
		<content:encoded><![CDATA[<p>That Michael Meeks has a sharp eye.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stu</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-28109</link>
		<dc:creator>Stu</dc:creator>
		<pubDate>Fri, 18 Jun 2010 13:29:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-28109</guid>
		<description><![CDATA[Patching GCC sounds like a great idea...   if constructors are run forward then surely this could help any programme compiled in this way.]]></description>
		<content:encoded><![CDATA[<p>Patching GCC sounds like a great idea&#8230;   if constructors are run forward then surely this could help any programme compiled in this way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TheFutureIsNear</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-28108</link>
		<dc:creator>TheFutureIsNear</dc:creator>
		<pubDate>Fri, 18 Jun 2010 12:47:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-28108</guid>
		<description><![CDATA[If Firefox cannot improve its startup speed then it will die :(]]></description>
		<content:encoded><![CDATA[<p>If Firefox cannot improve its startup speed then it will die <img src='http://blog.mozilla.org/tglek/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Osiris</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-28016</link>
		<dc:creator>Osiris</dc:creator>
		<pubDate>Thu, 10 Jun 2010 18:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-28016</guid>
		<description><![CDATA[Not to be trolling, but after reading several posts in this blog i get the impression that this work - while certainly interesting and insightful - is attacking the wrong problems with firefox/mozilla.

For example firefox&#039;s current caching implementation is so horrible that its performance impact on startup times is orders of magnitude greater than any library load ordering, assuming you&#039;re reloading tabs. [disk cache is restricted to 8192 items and has a hashing algorithm with lots of collisions, evicting valid items =&gt; open 100 tabs with 10 files each, restart FF, see a slow reload-fest]]]></description>
		<content:encoded><![CDATA[<p>Not to be trolling, but after reading several posts in this blog i get the impression that this work &#8211; while certainly interesting and insightful &#8211; is attacking the wrong problems with firefox/mozilla.</p>
<p>For example firefox&#8217;s current caching implementation is so horrible that its performance impact on startup times is orders of magnitude greater than any library load ordering, assuming you&#8217;re reloading tabs. [disk cache is restricted to 8192 items and has a hashing algorithm with lots of collisions, evicting valid items =&gt; open 100 tabs with 10 files each, restart FF, see a slow reload-fest]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: glandium</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-27933</link>
		<dc:creator>glandium</dc:creator>
		<pubDate>Sat, 29 May 2010 08:52:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-27933</guid>
		<description><![CDATA[FWIW, the cycle collection induced static initializers are just initializing vtables...]]></description>
		<content:encoded><![CDATA[<p>FWIW, the cycle collection induced static initializers are just initializing vtables&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tglek</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-27929</link>
		<dc:creator>tglek</dc:creator>
		<pubDate>Fri, 28 May 2010 21:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-27929</guid>
		<description><![CDATA[I tried modding the compiler to do the equivalent of __attribute__ ((section (“.text.initializers”)));, but basically every constructor, generated func, etc must be tagged correctly. That&#039;s a decent chunk of work to do right, so I decided to leave that as an exercise for the reader.

Most of the ones I checked were cyclecollector stuff. It would be an interesting project to make logging/cyclecollection initialize lazily. Thanks for identifying logging as a problem too.

ld doesn&#039;t do any linktime optimization. gcc 4.5 lto is too buggy to even bother with atm. It would be nice to engage llvm folks on this, perhaps someone there will want to make application startup competitive.]]></description>
		<content:encoded><![CDATA[<p>I tried modding the compiler to do the equivalent of __attribute__ ((section (“.text.initializers”)));, but basically every constructor, generated func, etc must be tagged correctly. That&#8217;s a decent chunk of work to do right, so I decided to leave that as an exercise for the reader.</p>
<p>Most of the ones I checked were cyclecollector stuff. It would be an interesting project to make logging/cyclecollection initialize lazily. Thanks for identifying logging as a problem too.</p>
<p>ld doesn&#8217;t do any linktime optimization. gcc 4.5 lto is too buggy to even bother with atm. It would be nice to engage llvm folks on this, perhaps someone there will want to make application startup competitive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: glandium</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-27920</link>
		<dc:creator>glandium</dc:creator>
		<pubDate>Fri, 28 May 2010 12:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-27920</guid>
		<description><![CDATA[I heard the llvm linker now does more link-time optimizations than GNU ld, maybe it would be worth checking it out, too.]]></description>
		<content:encoded><![CDATA[<p>I heard the llvm linker now does more link-time optimizations than GNU ld, maybe it would be worth checking it out, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: glandium</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-27919</link>
		<dc:creator>glandium</dc:creator>
		<pubDate>Fri, 28 May 2010 10:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-27919</guid>
		<description><![CDATA[So, it turns out only a few are PR_NewLogModules.
Most are actually due to cycle collection (from which a great number happens in SVG code, which is pretty much pointless at startup), some others are due to statically initialized instances of some classes that look like singletons, some others only contain a &quot;ret&quot; instructions (in which case one can wonder why gcc emits them), some others are due to the use of iostreams (in chromium code), a few are html5 parser initialization of static data, 

Most of these constructors actually don&#039;t do much, only copying data around, not even calling functions. Some do call functions, though.

Anyways, unfortunately, the __attribute__((section)) thing can&#039;t work with these static initializations...]]></description>
		<content:encoded><![CDATA[<p>So, it turns out only a few are PR_NewLogModules.<br />
Most are actually due to cycle collection (from which a great number happens in SVG code, which is pretty much pointless at startup), some others are due to statically initialized instances of some classes that look like singletons, some others only contain a &#8220;ret&#8221; instructions (in which case one can wonder why gcc emits them), some others are due to the use of iostreams (in chromium code), a few are html5 parser initialization of static data, </p>
<p>Most of these constructors actually don&#8217;t do much, only copying data around, not even calling functions. Some do call functions, though.</p>
<p>Anyways, unfortunately, the __attribute__((section)) thing can&#8217;t work with these static initializations&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: glandium</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-27918</link>
		<dc:creator>glandium</dc:creator>
		<pubDate>Fri, 28 May 2010 09:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-27918</guid>
		<description><![CDATA[I did some little investigation which got me interesting data: while I didn&#039;t check all these constructor functions, all that I checked are due to constructs like this in the source:
static PRLogModuleInfo *gWordCacheLog = PR_NewLogModule(&quot;wordCache&quot;);

(yes, all of those I checked were calls to PR_NewLogModule)]]></description>
		<content:encoded><![CDATA[<p>I did some little investigation which got me interesting data: while I didn&#8217;t check all these constructor functions, all that I checked are due to constructs like this in the source:<br />
static PRLogModuleInfo *gWordCacheLog = PR_NewLogModule(&#8220;wordCache&#8221;);</p>
<p>(yes, all of those I checked were calls to PR_NewLogModule)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: glandium</title>
		<link>http://blog.mozilla.org/tglek/2010/05/27/startup-backward-constructors/comment-page-1/#comment-27916</link>
		<dc:creator>glandium</dc:creator>
		<pubDate>Fri, 28 May 2010 08:35:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/tglek/?p=322#comment-27916</guid>
		<description><![CDATA[&gt; An interesting optimization would to have the compiler transitively mark functions reached by library initialization and place those in a .text.initializers section.

You can try __attribute__ ((section (&quot;.text.initializers&quot;)));]]></description>
		<content:encoded><![CDATA[<p>&gt; An interesting optimization would to have the compiler transitively mark functions reached by library initialization and place those in a .text.initializers section.</p>
<p>You can try __attribute__ ((section (&#8220;.text.initializers&#8221;)));</p>
]]></content:encoded>
	</item>
</channel>
</rss>
