<?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>Francis Robichaud &#187; Projects</title>
	<atom:link href="http://www.francisrobichaud.com/index.php/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.francisrobichaud.com</link>
	<description>Getting there ...</description>
	<lastBuildDate>Mon, 03 Nov 2008 19:28:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Optimizing Mozilla and Pixmap Management in X [Updates]</title>
		<link>http://www.francisrobichaud.com/index.php/2008/07/23/optimizing-mozilla-and-pixmap-management-in-x-updates/</link>
		<comments>http://www.francisrobichaud.com/index.php/2008/07/23/optimizing-mozilla-and-pixmap-management-in-x-updates/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 14:57:20 +0000</pubDate>
		<dc:creator>Skaber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://www.francisrobichaud.com/index.php/2008/07/23/optimizing-mozilla-and-pixmap-management-in-x-updates/</guid>
		<description><![CDATA[A few days passed since my first post about issues relating image quality and memory consumption in X. I gathered a few people here at RÃ©volution Linux to do some QA on my builds integrating my Mozilla framework modifications. Unfortunately, it seemed like intensive browsing and image viewing of scaled images led to some issues [...]]]></description>
			<content:encoded><![CDATA[<p>A few days passed since my first post about issues relating<a href="http://www.francisrobichaud.com/index.php/2008/07/08/optimizing-mozilla-and-pixmap-management-in-x/"> image quality and memory consumption in X</a>. I gathered a few people here at RÃ©volution Linux to do some QA on my builds integrating my Mozilla framework modifications. Unfortunately, it seemed like intensive browsing and image viewing of scaled images led to some issues with my <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/patches/">previous patches</a>. One of these was caused by  interlaced images which wouldn&#8217;t completely render. This was actually a bug in a Thebes function which would tell me that an image had done being uncompressed while that wasn&#8217;t the case. To support interlaced images, a new flag was added to indicate that an image had not completed its several decompression passes.</p>
<p>Next, there was a very light glitch when scrolling in upscaled images. This was caused by how I implemented scaling and memory usage reduction. I was creating subimages first and then scaling these to fit their destination rectangle. I now proceed with scaling before selecting subimages.</p>
<p>As my <a href="http://www.francisrobichaud.com/index.php/2008/07/08/optimizing-mozilla-and-pixmap-management-in-x/">update section</a> was explaining, I give users more flexibility of when to manipulate images and use GDK&#8217;s bilinear interpolation to increase image quality or when to limit memory usage by a single preference variable.</p>
<p>Finally, this <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/patches/memx.txt">new patch</a> should be considered the final version for bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=395260">395260</a>. It also could be considered a first step toward <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=372462">372462</a> resolution. <a href="http://drew.ca/">Joe</a> is currently refactoring the whole nsThebesImage code for  the Gecko 1.9.1 release and I would expect him to port my GDK manipulations to its future code.</p>
<p>Thin client users, enjoy a more stable Mozilla environment. Here&#8217;s a precompiled version of my patch. Feel free to try it and please report any weird behavior with image rendering.</p>
<p><strong>Download my </strong><strong><a href="http://rapidshare.com/files/133919584/firefox-3.0.1.en-US.linux-i686-memx.tar.bz2.html">patched Firefox 3.0.1 build (x86-linux)</a></strong><strong><a href="http://rapidshare.com/files/131850123/firefox-3.0.1.en-US.linux-i686.tar.bz2.html"><br />
</a></strong><strong>Download my </strong><strong><a href="http://rapidshare.com/files/133919524/firefox-3.0.1.en-US-memx.win32.zip.html">patched Firefox 3.0.1 build (x86-win32)</a></strong><strong><a href="http://rapidshare.com/files/131850123/firefox-3.0.1.en-US.linux-i686.tar.bz2.html"><br />
</a>Download the <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/patches/memx.txt">patch only</a></strong><a href="http://rapidshare.com/files/131850123/firefox-3.0.1.en-US.linux-i686.tar.bz2.html"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.francisrobichaud.com/index.php/2008/07/23/optimizing-mozilla-and-pixmap-management-in-x-updates/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Optimizing Mozilla and Pixmap Management in X</title>
		<link>http://www.francisrobichaud.com/index.php/2008/07/08/optimizing-mozilla-and-pixmap-management-in-x/</link>
		<comments>http://www.francisrobichaud.com/index.php/2008/07/08/optimizing-mozilla-and-pixmap-management-in-x/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 21:35:11 +0000</pubDate>
		<dc:creator>Skaber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://www.francisrobichaud.com/index.php/2008/07/08/optimizing-mozilla-and-pixmap-management-in-x/</guid>
		<description><![CDATA[The lastest Firefox release, version 3.0, relays on the Gecko as a layout engine and libpr0n for image decompression. The underlying Cairo framework greatly improves the code portability and increases the rendering on supported platforms. Cairo is used in several projects and sounds very promising with the eventual support of glitz to benefit of 3d [...]]]></description>
			<content:encoded><![CDATA[<p>The lastest Firefox release, version 3.0, relays on the Gecko as a layout engine and libpr0n for image decompression. The underlying Cairo framework greatly improves the code portability and increases the rendering on supported platforms. Cairo is used in several projects and sounds very promising with the eventual support of glitz to benefit of 3d hardware acceleration.Thebes is the C++ code used to wrap the Cairo framework in Mozilla. It uses ImageSurfaces which get decompressed image data from libpr0n. The current design of these surfaces is to send a full pixmap (decompressed images) to X without any limitation. Then, the underlying Cairo surfaces can be painted and the Mozilla application&#8217;s memory freed. The actual image data is kept as a pixmap in X&#8217;s memory. This choice of storing the pixmaps in X instead of in the application&#8217;s memory can increase the performances when rendering image: the new visible data does not need to transfered on every scrolling event.</p>
<p>On the other hand, storing pixmaps in X might not be the best solution to optimize the speed of image rendering. Considering that the full pixmap needs to be transfered between the application and X, rendering the first visible frame will be slower. Also, using unlimited memory in X may steal the available ressources for other applications.<span id="more-29"></span></p>
<p>Firefox has a long history of known bugs related to pixmap storage in X. I&#8217;ve focused on  bugs <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=296818">296818</a> and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=395260">395260</a> during the last weeks with the unique goal of changing way Mozilla handles pixmaps. The most affected users of pixmap storage are those who use Firefox on thin clients. These usually have low available memory and can&#8217;t be used to store pixmaps. This <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/">simple page</a> on a 128 Mbs RAM thin clients takes a while to load a few images and then causes a quick OOM kill before page rendering ends. One might say that showing multiple 5000&#215;1220 images resized to 50&#215;50 might not be common on the web but isn&#8217;t the web full of bad html coders ?</p>
<p><a target="_blank" href="http://www.gnome.org/~federico/news-2007-09.html#firefox-memory-1">Frederico Mena Quintero</a> has been very concerned about this behavior and integrated some modifications in Firefox to increase the quality of pixmap management. The infamous <a target="_blank" href="http://wiki.mozilla.org/Mobile/MemoryReduction">MOZ_DISABLE_IMAGE_OPTIMIZE</a> environment variable has also been integrated in Mozilla&#8217;s sources to reduce memory used by pixmap in X. Unfortunately, none of the integrated patches changes the behavior whitout any quality issue in the overall browing experience.</p>
<p>While comparing Firefox to Opera and Konqueror, I noticed that only Opera seemed to effectively manage it&#8217;s memory and pixmap caching. These graphics roughly represent both application memory and X memory when rendering this <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/">simple test page</a>.</p>
<table>
<tr>
<th></th>
<th>X Memory</th>
<th>App Memory</th>
</tr>
<tr>
<td>Firefox 3.0</td>
<td><a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/ff-index.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/ff-index.thumbnail.png" /></a></td>
<td><a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/ff-index1.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/ff-index1.thumbnail.png" /></a></td>
</tr>
<tr>
<td>Opera 9.27</td>
<td><a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/opera-index.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/opera-index.thumbnail.png" /></a></td>
<td><a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/opera-index1.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/opera-index1.thumbnail.png" /></a></td>
</tr>
<tr>
<td>Konqueror 3.5.9</td>
<td><a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/kon-index.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/kon-index.thumbnail.png" /> </a></td>
<td><a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/kon-index1.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/kon-index1.thumbnail.png" /> </a></td>
</tr>
</table>
<p>Note : these graphics have been generated using these basic homemade scripts to give an overview of the total memory usage. The y scale represents the memory usage in bytes while the x scale is the sample number. <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/appmem.py.txt">appmem.py</a> &#8211; <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/memx.py.txt">memx.py</a> (generate application data with <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/appmem.sh">appmem.sh</a>)</p>
<p>From these graphics, we can conclude that there&#8217;s is a clear possibility to optimize memory consumption by pre-manipulating images before we send them to X. At least, this is what Opera seems to do and that this results in better memory management. Why wouldn&#8217;t Mozilla applications keep the uncompressed image data locally instead of pushing it to X ?</p>
<p>There are actually two situations to take into consideration to achieve memory optimization. First, Mozilla should send only visible portions of images to X, this forces to recompute the visible portion on every user operation, such as scrolling or window resizing, and send the new sub-images to X. Image scaling also needs to be taken into consideration. For example, why would we transfer the full data of a 1920&#215;1200 image to X if it has been resized to 1024&#215;768 ? The pixmap would simply be using memory ignored when rendering. As the Cairo developer <a href="http://cworth.org/blog/">Carl Worth</a> pointed out, the advantage of transferring a full pixmap to X and let it resize an image would be to use the <a href="http://en.wikipedia.org/wiki/XRender">rendering extension</a> that could be available in X. Doing so still requires to transfer a full pixmap between the X application client and the X server. The transfer itself is very bandwidth consuming when using a remote X connection, even on a 100Mbit network. For example, a 5000&#215;1200 &#8211; 24 bits image represents around 46 Mbs of data to transfer and around 4.6 seconds of delay before we can render the first image. There is probably also an overhead when transferring images using local sockets but this would need to be verified by performing additional tests.</p>
<p>At first, I had implemented a basic downscaling algorithm and sub-image creation from an image&#8217;s original data. Since there are references to the GDK library in Thebes, I took the freedom to use available functions to manipulate raw image data. As <a href="http://live.gnome.org/GtkCairoIntegration">this page</a> explains it, GDK uses the RGBA format to represent a GdkPixbuf while Cairo respects the X server&#8217;s ARGB format. On a second thought, this results in the red and blue channel being inverted while manipulating images. There&#8217;s no reason why this would have consequences on the resulting image. Furthermore, GDK offers flexibility on the algorithms to scale images while the X server uses the <a href="http://en.wikipedia.org/wiki/Nearest_neighbor_interpolation">nearest-neighbor interpolation</a> algorithm. Hence, the gdk_pixbuf_new_subpixbuf() and gdk_pixbuf_scale_simple() functions offer the quickest way to easily pre-manipulate images in Thebes before the pixmaps are sent to X through the Cairo library. Moreover, the quality of the downscaled images is WAY better when using an algorithm different to the nearest-neighbor interpolation. The difference in Firefox is shown here :</p>
<p>Downscaled images in Firefox 3.0 using X&#8217;s nearest-neighbor interpolation: (current behavior)<br />
<a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/screenshot-mozilla-firefox.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/screenshot-mozilla-firefox.thumbnail.png" /></a><br />
Downscaled images using GDK&#8217;s bilinear interpolation:<br />
<a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/screenshot-minefield.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/screenshot-minefield.thumbnail.png" /></a></p>
<p>Mozilla&#8217;s QA team has built the Talos performance testing project to verify that code modifications do not decrease the product quality.<br />
<a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/talosff3">FF3 built from source output</a><br />
<a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/talosff3patched">FF3 patched sources output</a></p>
<p><strong>Update</strong> : After testing the patch in a few environments, I discovered that the scrolling quality could be sluggish when Firefox was used on a thin client with an application server having low resources. My first thought was that the transfer of raw data to the X server added an important overhead to the quickness of rendering but that hasn&#8217;t been the case in other environments. Since we can assume that a thin client&#8217;s backend should have the minimum ressources to support mallocs without using the swap area, there should be no visible difference of usage on a thin client. To give users control over image manipulation, I added the &#8220;browser.gdk_interpolation_threshold_percent&#8221; preference variable that allows values between 1-100 and has for effect to either use or bypass GDK image manipulations. The default value is 50% which only affects images being scaled by a factor of 50% or 200% and images with a visible portion under 50%. Lowering this value to it&#8217;s minimum (1%) would turn the feature off while using 100% will premanipulate any image overflowing it&#8217;s container. I&#8217;ve generated new Talos reports <a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/thinclient_talos">here</a> run on a thin client. Finally, as Joe from #gfx did mention, I added support for images upscaling with GDK to increase the image quality by also using the bilinear interpolation algorithm. Here is the difference between an original 309&#215;329 px image :<br />
Upscaled image in Firefox 3.0 using X&#8217;s nearest-neighbor interpolation: (current behavior)<br />
<a target="_blank" href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/screenshot-mozilla-firefox_upscale.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/screenshot-mozilla-firefox_upscale.thumbnail.png" /></a><br />
Upscale image using GDK&#8217;s bilinear interpolation:<br />
<a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/screenshot-minefield_upscale.png"><img src="http://www.francisrobichaud.com/wp-content/uploads/2008/07/screenshot-minefield_upscale.thumbnail.png" /></a></p>
<p><strong>Finally, here&#8217;s the complete patch that I hope will be integrated in Firefox&#8217;s and included in a future 3.0.x update. It currently only changes the behavior on UNIX systems since the main goal is to reduce memory consumption in X and that I am not aware of that kind of problems for GDI+ or Quartz backends. </strong></p>
<p><a name="patches"></a>diff : <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/patches/memx.txt">x-memory-optimization.diff</a><br />
cvs diff : <a href="http://www.francisrobichaud.com/wp-content/uploads/2008/07/patches/memx.cvs.txt">x-memory-optimization.cvs.diff</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.francisrobichaud.com/index.php/2008/07/08/optimizing-mozilla-and-pixmap-management-in-x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Perfect Firefox (Mozilla) Development Environment</title>
		<link>http://www.francisrobichaud.com/index.php/2008/05/27/the-perfect-firefox-devenv/</link>
		<comments>http://www.francisrobichaud.com/index.php/2008/05/27/the-perfect-firefox-devenv/#comments</comments>
		<pubDate>Tue, 27 May 2008 19:23:49 +0000</pubDate>
		<dc:creator>Skaber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.francisrobichaud.com/index.php/2008/05/27/the-perfect-firefox-devenv/</guid>
		<description><![CDATA[Here are some pretty straight forward steps to quickly get a development environment based on the Eclipse IDE. The tools in this environment are Eclipse with the Eclipse-CDT platform Distcc &#8211; a distributed C/C++ compiler Mozilla Framework &#8211; the base framework used for Mozilla projects Note: Mozilla has great documentation to help building any of [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some pretty straight forward steps to quickly get a development environment based on the Eclipse IDE. The tools in this environment are</p>
<ul>
<li><a href="http://www.eclipse.org">Eclipse</a> with the <a href="http://www.eclipse.org/cdt/">Eclipse-CDT</a> platform</li>
<li><a href="http://distcc.samba.org/">Distcc</a> &#8211; a distributed C/C++ compiler</li>
<li><a href="http://developer.mozilla.org/en/docs/Mozilla_Application_Framework_in_Detail">Mozilla Framework</a> &#8211; the base framework used for Mozilla projects</li>
</ul>
<p>Note: Mozilla has great <a href="http://developer.mozilla.org/en/docs/Build_Documentation">documentation</a> to help building any of their application. Please have a look there before posting any question. The #developers irc.mozilla.org channel is also a good start.</p>
<p>This tutorial assumes you&#8217;re using Ubuntu or a similar distro.</p>
<p align="left"><strong>Build and configure Firefox</strong></p>
<p>1. Install required tools and Firefox dependencies</p>
<blockquote><p>sudo apt-get install cvs distcc eclipse eclipse-cdt libcurl4-openssl-dev distccmon-gnome<br />
sudo apt-get build-dep firefox</p></blockquote>
<p><span id="more-28"></span>2. Get the Firefox source</p>
<p>TAR :</p>
<blockquote><p>wget <a class="external free" title="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.0b5/source/firefox-3.0b5-source.tar.bz2" rel="nofollow" href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.0b5/source/firefox-3.0b5-source.tar.bz2">ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.0b5/source/firefox-3.0b5-source.tar.bz2</a><br />
tar -xjf firefox-3.0b5-source.tar</p></blockquote>
<p>CVS :</p>
<blockquote><p>export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot<br />
cvs login<br />
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk<br />
cd mozilla<br />
make -f client.mk checkout</p></blockquote>
<p>Note: <a href="http://mxr.mozilla.org/seamonkey/">Mozilla MXR</a> offers a quick web search engine for source code</p>
<p>3. Create the Mozilla config file to build firefox</p>
<blockquote><p>cd mozilla<br />
echo &#8220;mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-@CONFIG_GUESS@&#8221; >> .mozconfig<br />
echo &#8220;ac_add_options &#8211;enable-application=browser&#8221; >> .mozconfig<br />
echo &#8220;mk_add_options MOZ_CO_PROJECT=browser&#8221; >> .mozconfig<br />
echo &#8220;ac_add_options &#8211;enable-debug&#8221; >> .mozconfig<br />
echo &#8220;ac_add_options &#8211;disable-optimize&#8221; >> .mozconfig<br />
echo &#8220;mk_add_options MOZ_MAKE_FLAGS=\&#8221;CC=&#8217;distcc gcc&#8217; CXX=&#8217;distcc g++&#8217; -j4\&#8221;" >> .mozconfig</p></blockquote>
<p>Note: Add the last line only if you plan to use distcc. Also, replace the &#8216;j4&#8242; parameter by the number of available processors (or cores) +2. Ex: if you have a total of 4 cores connected to your distcc server, use j6.</p>
<p align="left"><strong>Install and configure distcc</strong></p>
<p>1. Edit  /etc/default/distcc</p>
<blockquote><p>STARTDISTCC=&#8221;true&#8221;<br />
ALLOWEDNETS=&#8221;10.145.0.0/16&#8243;<br />
LISTENER=&#8221;0.0.0.0&#8243;</p></blockquote>
<p>2. Add distcc hosts</p>
<blockquote><p>mkdir ~/.distcc<br />
echo &#8220;localhost build-machine&#8221; > ~/distcc/hosts<br />
chmod 666 ~/.distcc/hosts</p></blockquote>
<p>3. Restart the service</p>
<blockquote><p>sudo /etc/init.d/distcc restart</p></blockquote>
<p align="left"><strong>Build Firefox</strong></p>
<blockquote><p>make -f client.mk build</p></blockquote>
<p align="left"><strong>Configure the Eclipse project</strong></p>
<p>1. Create the project</p>
<blockquote><p>File->New->Project&#8230;<br />
C/C++ Project->Standard Make C++ Project<br />
Project Name: Firefox<br />
Location : (select the extracted mozilla folder)<br />
Click &#8220;Finish&#8221;</p></blockquote>
<p>2. Configure the project</p>
<blockquote><p>Right-click on the new Firefox project in Eclipse&#8217;s left column<br />
Click &#8220;Properties&#8221;<br />
Select &#8220;Make C++ Project&#8221;<br />
Change &#8220;Build command&#8221; to &#8220;make -f client.mk&#8221;<br />
Change &#8220;Build (incremental build)&#8221; from &#8220;all&#8221; to &#8220;build&#8221;</p></blockquote>
<p>3.  Build Firefox from Eclipse</p>
<blockquote><p>You should remove the &#8220;Build automatically&#8221; option from the Project menu and build the application by right-clicking on the Firefox project and selecting &#8220;Build Project&#8221;<br />
If you do not see the &#8220;Build Project&#8221; option, make sure you are using the C/C++ perspective.<br />
This operation always takes a while since all subfolders and files need to be parsed (around 30k files)</p></blockquote>
<p><strong>Debugging Firefox</strong></p>
<p>1. Create the Debug/Run configuration</p>
<blockquote><p>Select Run->Debug&#8230; from the Eclipse menu<br />
Right-click on C/C++ Local Application and select New<br />
Project: firefox<br />
C/C++ Application: (select browse and choose mozilla/../obj-i686-pc-linux-gnu/dist/bin/firefox-bin)</p></blockquote>
<p>2. Add specific configuration</p>
<blockquote><p>In the Arguments tab, change the working directory to mozilla/../obj-i686-pc-linux-gnu/dist/bin/</p>
<p>In the Environment tab, create two variables,</p></blockquote>
<blockquote>
<blockquote><p>one with name LD_LIBRARY_PATH and value .:./plugins:.<br />
one with name LIBRARY_PATH  and value .:./components:.</p></blockquote>
<p>In the Debugger tab, remove the checkbox on &#8220;Stop on startup at:&#8221;</p></blockquote>
<p>3. Click Apply and hit Debug to start debugging Firefox. If you face any issue, you can try to switch the debugger from gdb/mi to gdb Debugger.</p>
<p>Now time to read <a rel="nofollow" title="http://www.mozilla.org/hacking/coding-introduction.html" class="external text" href="http://www.mozilla.org/hacking/coding-introduction.html">Introduction to Mozilla Source Code</a>. I might one day create a similar tutorial for a Visual Studio environment. Enjoy !</p>
<blockquote>
<blockquote /></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.francisrobichaud.com/index.php/2008/05/27/the-perfect-firefox-devenv/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Java Project Environment</title>
		<link>http://www.francisrobichaud.com/index.php/2008/02/25/java-project-environment/</link>
		<comments>http://www.francisrobichaud.com/index.php/2008/02/25/java-project-environment/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 19:55:39 +0000</pubDate>
		<dc:creator>Skaber</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.francisrobichaud.com/index.php/2008/02/25/java-project-environment/</guid>
		<description><![CDATA[The Java community is loaded with tons of applications and tools to cover every aspect of a large computer software development cycle. Our latest project, soon to be covered in a later post, uses the tools listed below. The quantity of available options requires a deep analysis of a project&#8217;s needs to find the suitable [...]]]></description>
			<content:encoded><![CDATA[<p>The Java community is loaded with tons of applications and tools to cover every aspect of a large computer software development cycle. Our latest project, soon to be covered in a later post, uses the tools listed below. The quantity of available options requires a deep analysis of a project&#8217;s needs to find the suitable combination of tools that will positively help development.</p>
<p align="center">Tools</p>
<p><strong>Maven</strong> : build management and configuration &#8211; http://maven.apache.org<br />
<strong>Hibernate</strong> : database object-relational mapping http://www.hibernate.org<br />
<strong>Struts</strong> : web applications development &#8211; http://struts.apache.org<br />
<strong>CruiseControl</strong> : build automation &#8211; http://cruisecontrol.sourceforge.net<br />
<strong>Subversion</strong> : version control system &#8211; http://subversion.tigris.org<br />
<strong>Trac</strong> : issue tracking system &#8211; http://trac.edgewall.org<br />
<span style="font-weight: bold">JUnit</span> : java unit test framework &#8211; http://www.junit.org<br />
<span style="font-weight: bold">Hadoop</span> : load-balance operations &#8211; http://hadoop.apache.org/core</p>
<p align="center">Eclipse plugins</p>
<p><strong>SQL Explorer</strong> : database management &#8211; http://<font size="-1"><span class="a">eclipsesql.sourceforge.net</span></font><br />
<strong>Subclipse</strong> : team source synchronisation &#8211; http://subclipse.tigris.org<br />
<strong>Maven</strong> : http://maven.apache.org/eclipse-plugin.html<br />
<strong> Hibernate-Tools</strong> : http://www.hibernate.org/255.html</p>
<p align="center">Documentation</p>
<p><strong>Project structure </strong>:</p>
<p>http://www.onjava.com/pub/a/onjava/2006/03/29/maven-2-0.html</p>
<p>http://java.sun.com/blueprints/code/projectconventions.html</p>
<p><strong>SVN management </strong>(tags and branches) :</p>
<p>http://svnbook.red-bean.com/en/1.1/ch04.html</p>
<p><strong> Installing Oracle on Solaris</strong> :</p>
<p>http://www.dbspecialists.com/presentations/oracle920solaris.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.francisrobichaud.com/index.php/2008/02/25/java-project-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hibernate and CHAR(%n) mapping</title>
		<link>http://www.francisrobichaud.com/index.php/2008/02/24/hibernate-and-charn-mapping/</link>
		<comments>http://www.francisrobichaud.com/index.php/2008/02/24/hibernate-and-charn-mapping/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 01:54:16 +0000</pubDate>
		<dc:creator>Skaber</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.francisrobichaud.com/index.php/2008/02/24/hibernate-and-charn-mapping/</guid>
		<description><![CDATA[By default, Hibernate seems to map CHAR(%n) database fields to java.lang.String. It causes no problem when querying a database without comparing this field, but unfortunately, the query may fail if the String does not containt %n chars. To avoid any problem, I suggest using VARCHAR(%n) fields where %n is the max size that can have [...]]]></description>
			<content:encoded><![CDATA[<p>By default, Hibernate seems to map CHAR(%n) database fields to java.lang.String. It causes no problem when querying a database without comparing this field, but unfortunately, the query may fail if the String does not containt %n chars. To avoid any problem, I suggest using VARCHAR(%n) fields where %n is the max size that can have your string. If you prefer to keep CHAR(%n) fields, probably for performance matters, refer to the hibernate documentation to specify a type such as &#8220;type=CharArray&#8217;&#8221; in your mapping.</p>
<p>The consequence of automatically mapping a database chararray field to a String object in java causes the impossibility of using this field in WHERE clauses.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.francisrobichaud.com/index.php/2008/02/24/hibernate-and-charn-mapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
