<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mwu&#039;s blog</title>
	<atom:link href="http://blog.mozilla.org/mwu/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.org/mwu</link>
	<description>A tale of a fearless coder</description>
	<lastBuildDate>Thu, 29 Sep 2011 16:16:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>mozilla-central: Now with 88.7% less PRBool!</title>
		<link>http://blog.mozilla.org/mwu/2011/09/29/mozilla-central-now-with-88-7-less-prbool/</link>
		<comments>http://blog.mozilla.org/mwu/2011/09/29/mozilla-central-now-with-88-7-less-prbool/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 10:01:55 +0000</pubDate>
		<dc:creator>mwu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/mwu/?p=83</guid>
		<description><![CDATA[3263 files changed, 30182 insertions(+), 30183 deletions(-) Bug 675553 has landed. According to a simple grep, we&#8217;ve gone from 31656 PRBools to 3562 PRBools and from 1914 PRPackedBool to 14 PRPackedBool. The remaining ones are mostly in C code or code passing data to C. PR_TRUE (18774 -&#62; 17953) and PR_FALSE (22973 -&#62; 20195) haven&#8217;t [...]]]></description>
				<content:encoded><![CDATA[<p> 3263 files changed, 30182 insertions(+), 30183 deletions(-)</p>
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=675553">Bug 675553</a> has landed. According to a simple grep, we&#8217;ve gone from 31656 PRBools to 3562 PRBools and from 1914 PRPackedBool to 14 PRPackedBool. The remaining ones are mostly in C code or code passing data to C.</p>
<p>PR_TRUE (18774 -&gt; 17953) and PR_FALSE (22973 -&gt; 20195) haven&#8217;t been affected as much, but now it&#8217;s your turn. Feel free to correct any PR_TRUEs or PR_FALSEs you see along the way.</p>
<p>A <a href="https://people.mozilla.com/~mwu/convert.sh">script</a> is available to help unbitrot your mercurial patch queue. More info is available in the <a href="https://groups.google.com/group/mozilla.dev.planning/browse_thread/thread/58d4883bfc0915a5">post on dev-planning</a>.</p>
<p>Another <a href="https://people.mozilla.com/~mwu/convert-consts.sh">script</a> is available to convert any PR_TRUEs or PR_FALSEs on the lines your patches touch. It operates in the same way as the first script.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/mwu/2011/09/29/mozilla-central-now-with-88-7-less-prbool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Twelve Booleans of Mozilla</title>
		<link>http://blog.mozilla.org/mwu/2011/07/28/the-twelve-booleans-of-mozilla/</link>
		<comments>http://blog.mozilla.org/mwu/2011/07/28/the-twelve-booleans-of-mozilla/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 06:15:49 +0000</pubDate>
		<dc:creator>mwu</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/mwu/?p=69</guid>
		<description><![CDATA[In order to switch Mozilla away from PRBools and to real boolean types, it&#8217;s necessary to first fix any code that relies on PRBool being a plain integer. This can be accomplished by ensuring every assignment to a PRBool or return from a function returning PRBool is in fact a boolean. I wrote a clang [...]]]></description>
				<content:encoded><![CDATA[<p>In order to switch Mozilla away from PRBools and to real boolean types, it&#8217;s necessary to first fix any code that relies on PRBool being a plain integer. This can be accomplished by ensuring every assignment to a PRBool or return from a function returning PRBool is in fact a boolean.</p>
<p>I wrote a clang plugin to do this called <a href="http://hg.mozilla.org/users/mwu_mozilla.com/boolcheck/">BoolCheck</a>. It&#8217;s like Taras&#8217; <a href="http://blog.mozilla.org/tglek/2007/06/26/status-report-recent-work/">Prcheck</a>, except based on clang instead of elsa. BoolCheck borrows Prcheck&#8217;s tests but everything else was written from scratch.</p>
<p>BoolCheck can check code like this:</p>
<pre>
typedef void (*prboolFuncPointerType)(PRBool i, double j, PRBool k);

prboolFuncPointerType* f;

void foo() {
  int foo = 12;
  PRBool zoo = 13;
  (*f)(foo, 44, 99);
}
</pre>
<p>and output errors like this:<br />
<code><br />
% clang++ -c -Xclang -load -Xclang ../BoolCheck.so -Xclang -add-plugin -Xclang boolcheck -Xclang -plugin-arg-boolcheck -Xclang -load-type-list -Xclang -plugin-arg-boolcheck -Xclang test-bools func_pointer_bad.cc<br />
</code></p>
<pre>
<strong>func_pointer_bad.cc:8:16: <span style="color: red;">error:</span> Literal is not a valid boolean</strong>
  PRBool zoo = 13;
               <span style="color: lime;">^~</span>
<strong>func_pointer_bad.cc:9:8: <span style="color: red;">error:</span> Non-boolean expression</strong>
  (*f)(foo, 44, 99);
       <span style="color: lime;">^~~</span>
<strong>func_pointer_bad.cc:9:17: <span style="color: red;">error:</span> Literal is not a valid boolean</strong>
  (*f)(foo, 44, 99);
                <span style="color: lime;">^~</span>
3 errors generated.
</pre>
<p>The most complicated part of this is determining whether something is a valid boolean or not. As it turns out, PRBool isn&#8217;t the only boolean type in the mozilla code. Every once in a while, another (custom) boolean type gets assigned to a PRBool. In order to make sure that type is always used as a boolean and not a integer, that type is added to the list of types being checked for correctness.</p>
<p>In the end, we need to check about twelve different boolean types to ensure PRBool is only ever assigned booleans.</p>
<ul>
<li>PRBool</li>
<li>PRPackedBool</li>
<li>JSBool</li>
<li>JSPackedBool</li>
<li>cairo_bool_t</li>
<li>pixman_bool_t</li>
<li>gboolean</li>
<li>PKIX_Boolean</li>
<li>CK_BBOOL</li>
<li>mdb_bool</li>
<li>mork_bool</li>
<li>realGLboolean</li>
</ul>
<p>The actual number can vary by platform since types like gboolean would only be seen on Linux/gtk, but other platforms usually introduce their own boolean type in place of gboolean. The plugin takes a file containing a list of these types to check for boolean correctness so it can easily be used to help other projects switch to real booleans.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/mwu/2011/07/28/the-twelve-booleans-of-mozilla/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Symlinks enabled on omnijar builds</title>
		<link>http://blog.mozilla.org/mwu/2011/07/26/symlinks-enabled-on-omnijar/</link>
		<comments>http://blog.mozilla.org/mwu/2011/07/26/symlinks-enabled-on-omnijar/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 03:39:27 +0000</pubDate>
		<dc:creator>mwu</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/mwu/?p=65</guid>
		<description><![CDATA[Bug 664907 has landed on mozilla-central. This enables symlinks in chrome packaging while omnijar is enabled. So, if you are: Working on files which are in the chrome directory (listed in a jar manifest) Working on files which are not preprocessed Not on Windows Running builds out of dist/bin (or the OSX equivalent) then running [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=664907">Bug 664907</a> has landed on mozilla-central. This enables symlinks in chrome packaging while omnijar is enabled. So, if you are:</p>
<ul>
<li>Working on files which are in the chrome directory (listed in a jar manifest)</li>
<li>Working on files which are not preprocessed</li>
<li>Not on Windows</li>
<li>Running builds out of dist/bin (or the OSX equivalent)</li>
</ul>
<p>then running make after changes won&#8217;t be necessary. Depending on the type of files you&#8217;re working on, starting Firefox with <a href="https://developer.mozilla.org/en/Setting_up_extension_development_environment#Development_command_flags">-purgecaches</a> is probably required, but it&#8217;s still faster than running make.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/mwu/2011/07/26/symlinks-enabled-on-omnijar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Killing PRBool with clang and a little bit of fire</title>
		<link>http://blog.mozilla.org/mwu/2011/07/23/killing-prbool-with-clang-and-a-little-bit-of-fire/</link>
		<comments>http://blog.mozilla.org/mwu/2011/07/23/killing-prbool-with-clang-and-a-little-bit-of-fire/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 07:30:41 +0000</pubDate>
		<dc:creator>mwu</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/mwu/?p=55</guid>
		<description><![CDATA[Once upon a time, there was a tool called prcheck which checked usage of PRBools and made sure only righteous 1s and 0s were assigned to PRBools. The goal was to correct all the uses of PRBool and hopefully turn PRBool into a Real Boolean. This didn&#8217;t happen, though many abuses of PRBool were corrected [...]]]></description>
				<content:encoded><![CDATA[<p>Once upon a time, there was a tool called <a href="http://blog.mozilla.org/tglek/2007/06/26/status-report-recent-work/">prcheck</a> which checked usage of PRBools and made sure only righteous 1s and 0s were assigned to PRBools. The goal was to correct all the uses of PRBool and hopefully turn PRBool into a Real Boolean.</p>
<p>This didn&#8217;t happen, though many abuses of PRBool were corrected along the way.</p>
<p>But, there may be hope now. A new PRBool checking tool based on clang has lead to a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671185">number</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671190">of</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671417">patches</a> correcting various misuses of PRBool across the Mozilla codebase. The abuses of PRBool are varied and creative, but they all tend to fall under two categories:</p>
<ul>
<li>Using PRBool when some other type would be more appropriate or vice versa. (bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671190">671190</a> and bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671417">671417</a>)</li>
<li>Returning NS_ERROR_* codes in functions that return PRBool. This is particularly bad as error codes are likely to be treated as true, and true usually means success. (bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=671185">671185</a>)</li>
</ul>
<p>With the help of this clang plugin, a bit of manual build fixing, and some hours lost in gdb, we can typedef PRBool as a (real) bool. The local build here is capable of starting up, passing make check, and passing all but one xpcshell test.</p>
<p>More updates and code release of this clang plugin to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/mwu/2011/07/23/killing-prbool-with-clang-and-a-little-bit-of-fire/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Extensions now installed packed</title>
		<link>http://blog.mozilla.org/mwu/2010/09/10/extensions-now-installed-packed/</link>
		<comments>http://blog.mozilla.org/mwu/2010/09/10/extensions-now-installed-packed/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 00:14:11 +0000</pubDate>
		<dc:creator>mwu</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/mwu/?p=48</guid>
		<description><![CDATA[Bug 533038 has landed. Extensions are no longer unpacked by default when installed. If an extension with an id such as {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} is installed, it will show up in the profile extensions directory as a file named {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.xpi instead of a directory named {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}. This was done to reduce the startup impact of having too [...]]]></description>
				<content:encoded><![CDATA[<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=533038">Bug 533038</a> has landed. Extensions are no longer unpacked by default when installed. If an extension with an id such as {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} is installed, it will show up in the profile extensions directory as a file named <code>{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.xpi</code> instead of a directory named <code>{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}</code>. This was done to reduce the <a href="http://blog.mozilla.org/tglek/2010/03/11/extensions-startup/">startup impact</a> of having too many files from extensions. It will also make it possible to fix <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=531886">startup cache/fastload invalidation</a> by <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=594058">stat&#8217;ing the extensions directory</a>.</p>
<p>Extension developers should note that they can opt back into unpacked installation by adding <code>&lt;em:unpack&gt;true&lt;/em:unpack&gt;</code> to their install.rdf. Extensions with dictionaries, binary components, or window icons are most likely to be incompatible with packed installation.</p>
<p>Due to the entire extension being packed, developers no longer need to pack their chrome files into jars for better startup performance. If a developer chooses to keep packing the chrome files into jars, any jars inside the xpi should not be compressed since compressed jars inside the xpi use more memory to access. The files within the jar within the xpi, however, can continue to be compressed without much impact.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/mwu/2010/09/10/extensions-now-installed-packed/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Omnijar. How does it work?</title>
		<link>http://blog.mozilla.org/mwu/2010/08/13/omnijar-how-does-it-work/</link>
		<comments>http://blog.mozilla.org/mwu/2010/08/13/omnijar-how-does-it-work/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 00:28:59 +0000</pubDate>
		<dc:creator>mwu</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://blog.mozilla.org/mwu/?p=8</guid>
		<description><![CDATA[What is omnijar? Omnijar is a new packaging format. It&#8217;s expected to be enabled by default for Firefox 4.0b5. The difference that omnijar makes can been seen comparing the file listings of builds before and after omnijar: Trunk Linux build without omnijar: firefox/application.ini firefox/blocklist.xml firefox/chrome/browser.jar firefox/chrome/en-US.jar firefox/chrome/icons/default/default16.png firefox/chrome/icons/default/default32.png firefox/chrome/icons/default/default48.png firefox/chrome/localized.manifest firefox/chrome.manifest firefox/chrome/nonlocalized.manifest firefox/chrome/pippki.jar firefox/chrome/toolkit.jar firefox/components/addonManager.js [...]]]></description>
				<content:encoded><![CDATA[<h2>What is omnijar?</h2>
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=556644">Omnijar</a> is a new packaging format. It&#8217;s expected to be enabled by default for Firefox 4.0b5.</p>
<p>The difference that omnijar makes can been seen comparing the file listings of builds before and after omnijar:<br />
<span id="more-8"></span></p>
<h3><strong>Trunk Linux build without omnijar:</strong></h3>
<blockquote><p><code>firefox/application.ini<br />
firefox/blocklist.xml<br />
firefox/chrome/browser.jar<br />
firefox/chrome/en-US.jar<br />
firefox/chrome/icons/default/default16.png<br />
firefox/chrome/icons/default/default32.png<br />
firefox/chrome/icons/default/default48.png<br />
firefox/chrome/localized.manifest<br />
firefox/chrome.manifest<br />
firefox/chrome/nonlocalized.manifest<br />
firefox/chrome/pippki.jar<br />
firefox/chrome/toolkit.jar<br />
firefox/components/addonManager.js<br />
firefox/components/amContentHandler.js<br />
firefox/components/amWebInstallListener.js<br />
firefox/components/browser.xpt<br />
firefox/components/components.manifest<br />
firefox/components/contentAreaDropListener.js<br />
firefox/components/contentSecurityPolicy.js<br />
firefox/components/crypto-SDR.js<br />
firefox/components/FeedConverter.js<br />
firefox/components/FeedProcessor.js<br />
firefox/components/FeedWriter.js<br />
firefox/components/fuelApplication.js<br />
firefox/components/GPSDGeolocationProvider.js<br />
firefox/components/interfaces.manifest<br />
firefox/components/jsconsole-clhandler.js<br />
firefox/components/libbrowsercomps.so<br />
firefox/components/libdbusservice.so<br />
firefox/components/libmozgnome.so<br />
firefox/components/NetworkGeolocationProvider.js<br />
firefox/components/nsBadCertHandler.js<br />
firefox/components/nsBlocklistService.js<br />
firefox/components/nsBrowserContentHandler.js<br />
firefox/components/nsBrowserGlue.js<br />
firefox/components/nsContentDispatchChooser.js<br />
firefox/components/nsContentPrefService.js<br />
firefox/components/nsDefaultCLH.js<br />
firefox/components/nsDownloadManagerUI.js<br />
firefox/components/nsFilePicker.js<br />
firefox/components/nsFormAutoComplete.js<br />
firefox/components/nsFormHistory.js<br />
firefox/components/nsHandlerService.js<br />
firefox/components/nsHelperAppDlg.js<br />
firefox/components/nsINIProcessor.js<br />
firefox/components/nsLivemarkService.js<br />
firefox/components/nsLoginInfo.js<br />
firefox/components/nsLoginManager.js<br />
firefox/components/nsLoginManagerPrompter.js<br />
firefox/components/nsMicrosummaryService.js<br />
firefox/components/nsPlacesAutoComplete.js<br />
firefox/components/nsPlacesDBFlush.js<br />
firefox/components/nsPlacesExpiration.js<br />
firefox/components/nsPrivateBrowsingService.js<br />
firefox/components/nsPrompter.js<br />
firefox/components/nsProxyAutoConfig.js<br />
firefox/components/nsSafebrowsingApplication.js<br />
firefox/components/nsSearchService.js<br />
firefox/components/nsSearchSuggestions.js<br />
firefox/components/nsSessionStartup.js<br />
firefox/components/nsSessionStore.js<br />
firefox/components/nsSetDefaultBrowser.js<br />
firefox/components/nsSidebar.js<br />
firefox/components/nsTaggingService.js<br />
firefox/components/nsTryToClose.js<br />
firefox/components/nsUpdateService.js<br />
firefox/components/nsUpdateServiceStub.js<br />
firefox/components/nsUpdateTimerManager.js<br />
firefox/components/nsUrlClassifierLib.js<br />
firefox/components/nsUrlClassifierListManager.js<br />
firefox/components/nsURLFormatter.js<br />
firefox/components/nsWebHandlerApp.js<br />
firefox/components/PlacesProtocolHandler.js<br />
firefox/components/storage-Legacy.js<br />
firefox/components/storage-mozStorage.js<br />
firefox/components/txEXSLTRegExFunctions.js<br />
firefox/components/WeaveCrypto.js<br />
firefox/components/Weave.js<br />
firefox/components/WebContentConverter.js<br />
firefox/crashreporter<br />
firefox/crashreporter.ini<br />
firefox/crashreporter-override.ini<br />
firefox/defaults/autoconfig/platform.js<br />
firefox/defaults/autoconfig/prefcalls.js<br />
firefox/defaults/pref/channel-prefs.js<br />
firefox/defaults/pref/firefox-branding.js<br />
firefox/defaults/pref/firefox.js<br />
firefox/defaults/pref/firefox-l10n.js<br />
firefox/defaults/pref/reporter.js<br />
firefox/defaults/pref/services-sync.js<br />
firefox/defaults/profile/bookmarks.html<br />
firefox/defaults/profile/chrome/userChrome-example.css<br />
firefox/defaults/profile/chrome/userContent-example.css<br />
firefox/defaults/profile/localstore.rdf<br />
firefox/defaults/profile/mimeTypes.rdf<br />
firefox/defaults/profile/prefs.js<br />
firefox/dependentlibs.list<br />
firefox/dictionaries/en-US.aff<br />
firefox/dictionaries/en-US.dic<br />
firefox/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png<br />
firefox/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf<br />
firefox/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png<br />
firefox/firefox<br />
firefox/firefox-bin<br />
firefox/greprefs.js<br />
firefox/icons/document.png<br />
firefox/icons/mozicon128.png<br />
firefox/icons/updater.png<br />
firefox/libfreebl3.chk<br />
firefox/libfreebl3.so<br />
firefox/libmozalloc.so<br />
firefox/libmozjs.so<br />
firefox/libmozsqlite3.so<br />
firefox/libnspr4.so<br />
firefox/libnss3.so<br />
firefox/libnssckbi.so<br />
firefox/libnssdbm3.chk<br />
firefox/libnssdbm3.so<br />
firefox/libnssutil3.so<br />
firefox/libplc4.so<br />
firefox/libplds4.so<br />
firefox/libsmime3.so<br />
firefox/libsoftokn3.chk<br />
firefox/libsoftokn3.so<br />
firefox/libssl3.so<br />
firefox/libxpcom.so<br />
firefox/libxul.so<br />
firefox/modules/AddonLogging.jsm<br />
firefox/modules/AddonManager.jsm<br />
firefox/modules/AddonRepository.jsm<br />
firefox/modules/AddonUpdateChecker.jsm<br />
firefox/modules/CertUtils.jsm<br />
firefox/modules/CrashSubmit.jsm<br />
firefox/modules/CSPUtils.jsm<br />
firefox/modules/ctypes.jsm<br />
firefox/modules/debug.js<br />
firefox/modules/distribution.js<br />
firefox/modules/DownloadLastDir.jsm<br />
firefox/modules/DownloadPaths.jsm<br />
firefox/modules/DownloadUtils.jsm<br />
firefox/modules/FileUtils.jsm<br />
firefox/modules/Geometry.jsm<br />
firefox/modules/HUDService.jsm<br />
firefox/modules/InlineSpellChecker.jsm<br />
firefox/modules/ISO8601DateUtils.jsm<br />
firefox/modules/LightweightThemeConsumer.jsm<br />
firefox/modules/LightweightThemeManager.jsm<br />
firefox/modules/Microformats.js<br />
firefox/modules/NetUtil.jsm<br />
firefox/modules/NetworkPrioritizer.jsm<br />
firefox/modules/openLocationLastURL.jsm<br />
firefox/modules/PerfMeasurement.jsm<br />
firefox/modules/PlacesDBUtils.jsm<br />
firefox/modules/PlacesUIUtils.jsm<br />
firefox/modules/PlacesUtils.jsm<br />
firefox/modules/PluginProvider.jsm<br />
firefox/modules/PluralForm.jsm<br />
firefox/modules/PopupNotifications.jsm<br />
firefox/modules/Services.jsm<br />
firefox/modules/services-sync/auth.js<br />
firefox/modules/services-sync/base_records/collection.js<br />
firefox/modules/services-sync/base_records/crypto.js<br />
firefox/modules/services-sync/base_records/keys.js<br />
firefox/modules/services-sync/base_records/wbo.js<br />
firefox/modules/services-sync/constants.js<br />
firefox/modules/services-sync/engines/bookmarks.js<br />
firefox/modules/services-sync/engines/clients.js<br />
firefox/modules/services-sync/engines/forms.js<br />
firefox/modules/services-sync/engines/history.js<br />
firefox/modules/services-sync/engines.js<br />
firefox/modules/services-sync/engines/passwords.js<br />
firefox/modules/services-sync/engines/prefs.js<br />
firefox/modules/services-sync/engines/tabs.js<br />
firefox/modules/services-sync/ext/Observers.js<br />
firefox/modules/services-sync/ext/Preferences.js<br />
firefox/modules/services-sync/ext/StringBundle.js<br />
firefox/modules/services-sync/ext/Sync.js<br />
firefox/modules/services-sync/identity.js<br />
firefox/modules/services-sync/log4moz.js<br />
firefox/modules/services-sync/notifications.js<br />
firefox/modules/services-sync/resource.js<br />
firefox/modules/services-sync/service.js<br />
firefox/modules/services-sync/status.js<br />
firefox/modules/services-sync/stores.js<br />
firefox/modules/services-sync/trackers.js<br />
firefox/modules/services-sync/type_records/bookmark.js<br />
firefox/modules/services-sync/type_records/clients.js<br />
firefox/modules/services-sync/type_records/forms.js<br />
firefox/modules/services-sync/type_records/history.js<br />
firefox/modules/services-sync/type_records/passwords.js<br />
firefox/modules/services-sync/type_records/prefs.js<br />
firefox/modules/services-sync/type_records/tabs.js<br />
firefox/modules/services-sync/util.js<br />
firefox/modules/SpatialNavigation.js<br />
firefox/modules/stylePanel.jsm<br />
firefox/modules/tabview/AllTabs.jsm<br />
firefox/modules/tabview/groups.jsm<br />
firefox/modules/tabview/utils.jsm<br />
firefox/modules/utils.js<br />
firefox/modules/WindowDraggingUtils.jsm<br />
firefox/modules/XPCOMUtils.jsm<br />
firefox/modules/XPIProvider.jsm<br />
firefox/mozilla-xremote-client<br />
firefox/platform.ini<br />
firefox/plugin-container<br />
firefox/README.txt<br />
firefox/removed-files<br />
firefox/res/contenteditable.css<br />
firefox/res/designmode.css<br />
firefox/res/dtd/mathml.dtd<br />
firefox/res/dtd/xhtml11.dtd<br />
firefox/res/EditorOverride.css<br />
firefox/res/entityTables/html40Latin1.properties<br />
firefox/res/entityTables/html40Special.properties<br />
firefox/res/entityTables/html40Symbols.properties<br />
firefox/res/entityTables/htmlEntityVersions.properties<br />
firefox/res/entityTables/mathml20.properties<br />
firefox/res/entityTables/transliterate.properties<br />
firefox/res/fonts/mathfont.properties<br />
firefox/res/fonts/mathfontStandardSymbolsL.properties<br />
firefox/res/fonts/mathfontSTIXNonUnicode.properties<br />
firefox/res/fonts/mathfontSTIXSize1.properties<br />
firefox/res/fonts/mathfontSTIXSizeOneSym.properties<br />
firefox/res/fonts/mathfontUnicode.properties<br />
firefox/res/grabber.gif<br />
firefox/res/html/folder.png<br />
firefox/res/langGroups.properties<br />
firefox/res/language.properties<br />
firefox/res/svg.css<br />
firefox/res/table-add-column-after-active.gif<br />
firefox/res/table-add-column-after.gif<br />
firefox/res/table-add-column-after-hover.gif<br />
firefox/res/table-add-column-before-active.gif<br />
firefox/res/table-add-column-before.gif<br />
firefox/res/table-add-column-before-hover.gif<br />
firefox/res/table-add-row-after-active.gif<br />
firefox/res/table-add-row-after.gif<br />
firefox/res/table-add-row-after-hover.gif<br />
firefox/res/table-add-row-before-active.gif<br />
firefox/res/table-add-row-before.gif<br />
firefox/res/table-add-row-before-hover.gif<br />
firefox/res/table-remove-column-active.gif<br />
firefox/res/table-remove-column.gif<br />
firefox/res/table-remove-column-hover.gif<br />
firefox/res/table-remove-row-active.gif<br />
firefox/res/table-remove-row.gif<br />
firefox/res/table-remove-row-hover.gif<br />
firefox/run-mozilla.sh<br />
firefox/searchplugins/amazondotcom.xml<br />
firefox/searchplugins/answers.xml<br />
firefox/searchplugins/creativecommons.xml<br />
firefox/searchplugins/eBay.xml<br />
firefox/searchplugins/google.xml<br />
firefox/searchplugins/wikipedia.xml<br />
firefox/searchplugins/yahoo.xml<br />
firefox/Throbber-small.gif<br />
firefox/update.locale<br />
firefox/updater<br />
firefox/updater.ini</code></p></blockquote>
<p>That&#8217;s 259 files. The total number of files differ by platform, but not by much.</p>
<h3><strong>Trunk Linux build with omnijar:</strong></h3>
<blockquote><p><code>firefox/application.ini<br />
firefox/blocklist.xml<br />
firefox/chrome/icons/default/default16.png<br />
firefox/chrome/icons/default/default32.png<br />
firefox/chrome/icons/default/default48.png<br />
firefox/chrome.manifest<br />
firefox/components/binary.manifest<br />
firefox/components/libbrowsercomps.so<br />
firefox/components/libdbusservice.so<br />
firefox/components/libmozgnome.so<br />
firefox/crashreporter<br />
firefox/crashreporter.ini<br />
firefox/crashreporter-override.ini<br />
firefox/dependentlibs.list<br />
firefox/dictionaries/en-US.aff<br />
firefox/dictionaries/en-US.dic<br />
firefox/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png<br />
firefox/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf<br />
firefox/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png<br />
firefox/firefox<br />
firefox/firefox-bin<br />
firefox/icons/document.png<br />
firefox/icons/mozicon128.png<br />
firefox/icons/updater.png<br />
firefox/libfreebl3.chk<br />
firefox/libfreebl3.so<br />
firefox/libmozalloc.so<br />
firefox/libmozjs.so<br />
firefox/libmozsqlite3.so<br />
firefox/libnspr4.so<br />
firefox/libnss3.so<br />
firefox/libnssckbi.so<br />
firefox/libnssdbm3.chk<br />
firefox/libnssdbm3.so<br />
firefox/libnssutil3.so<br />
firefox/libplc4.so<br />
firefox/libplds4.so<br />
firefox/libsmime3.so<br />
firefox/libsoftokn3.chk<br />
firefox/libsoftokn3.so<br />
firefox/libssl3.so<br />
firefox/libxpcom.so<br />
firefox/libxul.so<br />
firefox/mozilla-xremote-client<br />
firefox/omni.jar<br />
firefox/platform.ini<br />
firefox/plugin-container<br />
firefox/README.txt<br />
firefox/removed-files<br />
firefox/run-mozilla.sh<br />
firefox/searchplugins/amazondotcom.xml<br />
firefox/searchplugins/answers.xml<br />
firefox/searchplugins/creativecommons.xml<br />
firefox/searchplugins/eBay.xml<br />
firefox/searchplugins/google.xml<br />
firefox/searchplugins/wikipedia.xml<br />
firefox/searchplugins/yahoo.xml<br />
firefox/Throbber-small.gif<br />
firefox/update.locale<br />
firefox/updater<br />
firefox/updater.ini</code></p></blockquote>
<p>There are 61 files with omnijar. The omnijar build has 76.4% less files. Or, as I like to think of it, the non-omnijar build has 324.6% more files.</p>
<h2>How does it work?</h2>
<p><em>A comparison of different packaging formats in Mozilla</em></p>
<ol>
<li><strong>Flat packaging.</strong> The original. Just files in directories.</li>
<li><strong>Jar packaging.</strong> A more sophisticated way. Files in the chrome directory are packed into jars.</li>
<li><strong>Omnijar packaging.</strong> The third generation packaging format. Every file that can be placed into a jar is packed into omni.jar.</li>
</ol>
<p>All the files that are now gone have been packed into a file named omni.jar.</p>
<h2>Why?</h2>
<h4>It&#8217;s faster.</h4>
<p>Storing related files in a jar is more efficient than scattering files across the filesystem. Flat packaging causes a sort of high level fragmentation where related files might be stored far apart on the disk and result in wasted time seeking. Keeping everything in a file minimizes fragmentation. Startup time is generally improved. Omnijar also paves the way for other startup optimizations.</p>
<h4>It&#8217;s useful for developers</h4>
<p>Omnijar improves performance for users, but it also provides a handy feature for developers &#8211; omnijar packaging can be easily converted into flat packaging. To do so, unzip the omni.jar file and delete it. Any file can then be directly edited.</p>
<p>Developers building Firefox with omnijar enabled (&#8211;enable-chrome-format=omni) should know that the build in the dist/bin directory is flat packaged. Files are only packed into the omnijar after packaging with |make package|.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.org/mwu/2010/08/13/omnijar-how-does-it-work/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
