tag:blogger.com,1999:blog-7701380641716005772024-02-07T22:16:29.294-08:00GeekPower Web DeveloperI am a PHP / C#.NET 3.5 developer for GeekPower.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.comBlogger46125tag:blogger.com,1999:blog-770138064171600577.post-1807156749645605192009-12-23T11:59:00.000-08:002009-12-23T11:59:49.926-08:00TinyMCE - Strict XML ComplianceSo I thought I was done.<br />
<br />
I am always wrong about that.<br />
<div class="separator" style="clear: both; text-align: center;"><br />
</div>Joomla is setup and the sample content has been written up and I thought I was done. But this project requires Strict XML Compliance. I have no idea why except that it does. So I make my way over to the <a href="http://validator.w3.org/">w3c validator</a>. Oh my I have errors. Cue rolling eyes AND <a href="http://www.tiglath.org/yahoo/oldsmilies/big25.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.tiglath.org/yahoo/oldsmilies/big25.gif" style="border:none"/></a>. So I begin my attempt to clean up my html. It is pretty clean to begin with but not for Mr. Validator!<br />
<br />
<b>The Errors</b><br />
First few errors are easy. <br /><br />
are not allowed outside of a block tag. Hmmm, what is that doing there anyways? Oh, thanks Joomla. Ok, clean that up and next. <input />tags not allow outside of a block tag....huh? didn't I already have this problem. Oh, thanks again Joomla. Ok, that is fixed and now the really easy error to fix ( boy was I wrong ). <img /> tags cannot have the border attribute. No Problem!<br />
<br />
<b>The Fix</b><br />
Go into the article editor. Click on the offending image and set border to .... nothing. Click update and done and done.<br />
<br />
Of course toggle the editor to html mode just to confirm and ............... the border = 0 is back. What?!?!?<br />
<br />
<b>The next Fix</b><br />
Ok not a problem. I'll just remove it here in the html and update. Problem solved. But .... I should check just in case. What?!?!?!? It's back! But!!! How?!?! Where?!?! AAAAAAAAAARGGGGGGG!!!!!!<br />
<br />
At this point I'm about to declare that we cannot be strict compliant using Joomla when I finally discover the answer to life ....... I mean the answer to my problem.<br />
<br />
<b>The actual Fix</b><br />
In plugins/editors/tinymce.php on line 353 is the valid elements control for the img tag. On this line exists border=0 which means if border is missing add it with a value of 0. So, I removed it. And all is right in the world.<br />
<br />
So to change what attributes tinymce forces, adds, or to change the default value. The file to change is plugins/editors/tinymce.php.<br />
<br />
Good Luck and Good Night!Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-90446465500307160462009-12-22T12:29:00.000-08:002009-12-22T20:01:14.242-08:00JoomFish Multi-Language In Custom Components<div style="float: left; width: 50%;"><span style="font-weight: bold;">Table Of Contents<br />
</span><ol><li><a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046#joomfish">What is JoomFish?</a></li>
<li><a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046#joomla">How does it work with Joomla?</a></li>
<li><a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046#requirements">Requirements</a></li>
<li><a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046#first">First Step</a> - <span style="font-size: 85%;">Create translation.xml</span><br />
</li>
<li><a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046#second">Second Step</a> - <span style="font-size: 85%;">Update SQL queries</span><br />
</li>
<li><a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046#third">Third Step</a> - <span style="font-size: 85%;">Add direct translation parameters</span><br />
</li>
<li><a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046#finished">Finished!</a><br />
</li>
</ol></div><div style="float: left; margin-bottom: 15px; width: 48%;"><span style="font-weight: bold;">Joomla and JoomFish</span><br />
Developing components in <a href="http://www.joomla.org/">Joomla </a>that integrate with <a href="http://www.joomfish.net/">JoomFish </a>can be frustrating for the uninitiated. There isn't much documentation or it is spread about in multiple articles. I didn't find the JoomFish forums too helpful for searching through but I eventually found everything I needed. This article is about putting all the pieces together.<br />
<br />
</div><br />
<br />
<a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046" name="joomfish"><span style="clear: both; font-weight: bold;">What is Joomfish?</span></a><br />
For those of you that do not know <a href="http://www.joomfish.net/">JoomFish</a> is an multi-language extension for <a href="http://www.joomla.org/">Joomla</a>. It allows for a site to control the translations of multiple languages.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie5UB8E2QJ2E8-EMwlwRwlFaBtrkL3MVZ5IICF_wG1xafqgqEEBvezBlk27zzvY_X8BHpA5KjAXJvxTNlGhA4PFFD8En9aLZOMIirre-xOhlwclD-K-5CmhUrz7IyZdwNi4Ceph_kAGDwy/s1600-h/language_selection.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418253053365992770" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie5UB8E2QJ2E8-EMwlwRwlFaBtrkL3MVZ5IICF_wG1xafqgqEEBvezBlk27zzvY_X8BHpA5KjAXJvxTNlGhA4PFFD8En9aLZOMIirre-xOhlwclD-K-5CmhUrz7IyZdwNi4Ceph_kAGDwy/s400/language_selection.JPG" style="cursor: pointer; height: 185px; width: 385px;" /></a><br />
<br />
<a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046" name="joomla"><span style="font-weight: bold;">How does it work with Joomla?</span></a><br />
In Joomla everything is broken into components, modules, plugins and content. JoomFish adds the ability to control the language translations for all these parts. The most common use is creating translations for content and menus.<br />
<br />
But that is not all. JoomFish can also be used to manage translations for custom components.<br />
<br />
<a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046" name="requirements"><span style="font-weight: bold;">Requirements</span></a><br />
If you have never installed JoomFish or need assistance then please visit <a href="http://www.joomfish.net/en/documentation/tutorials/27-your-first-joomfish-installation">JoomFish Installation</a>.<br />
Software: Joomla version 1.5.15 <br />
JoomFish 2.0.4<br />
PHP 5+<br />
<br />
This article assumes: you are a php developer who is ripping up Joomla with extension development, you have a finished component you want to add multi-language support to, and you have JoomFish installed, working, and have played with it enough to understand how to manage translations.<br />
<br />
<span style="font-style: italic;">Note:</span><br />
If these assumptions do not apply to you please bookmark this page because once you start into working with JoomFish you'll need the information I am posting here.<br />
<br />
<a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046" name="first"><span style="font-weight: bold;">First Step</span></a><br />
We need JoomFish to be aware of the content that needs translating. This part assumes we have created our own tables to contain our content.<br />
<br />
<span style="font-weight: bold;">Create Content Description File</span><br />
For JoomFish to know what content needs translation we need to create an xml file.<br />
Here is a <a href="http://www.joomfish.net/de/dokumentation/entwickler-doku/30-creation-of-content-elements">description of the xml file</a>.<br />
<br />
Create a new text file with the same name as the content table and the extension .xml.<br />
<br />
The table we'll be using is ca_geekpower_accordianitem.<br />
<br />
<span style="font-style: italic;">Note: I spelled Accordion wrong from the beginning and I have it spelled wrong all through out. :(</span><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_ocOQCl-lgf3e2oaZ5EANEOyxxrcplFruzSdvDqV_7PxZwV5vzLEG3gyDgFrU8GobJc90Fp3AfZ7vYlKT_m4B9z_R8JKAUhPMYkC_bSGLY_9ov48blGtq1Refp8rYFQHBEM9MkbYtfrto/s1600-h/accordianitem_table.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418258202494277426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_ocOQCl-lgf3e2oaZ5EANEOyxxrcplFruzSdvDqV_7PxZwV5vzLEG3gyDgFrU8GobJc90Fp3AfZ7vYlKT_m4B9z_R8JKAUhPMYkC_bSGLY_9ov48blGtq1Refp8rYFQHBEM9MkbYtfrto/s400/accordianitem_table.JPG" style="cursor: pointer; float: left; height: 141px; margin-right: 10px; width: 205px;" /></a> id is the primary key<br />
accordianId is the parent this item belongs to<br />
title is the name of the item which appears as a header<br />
ordering is the order the item - not used here<br />
content is the content to show or hide<br />
<span style="clear: both; display: block; float: none;"><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-65iupZVuaG4gEVUGZY8-106l_Q4zv7kqOq35HeuulfD4SV9Q-L4pn0rYcbMAy7wLVcf3QRjG0U9SvCAN-Olj50UHAvLYQnQ7XitQDpfEZifjzv4nqPm6F6WBn9JG58Zs6qKBGDqfYPkN/s1600-h/accordian.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418259235165634274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-65iupZVuaG4gEVUGZY8-106l_Q4zv7kqOq35HeuulfD4SV9Q-L4pn0rYcbMAy7wLVcf3QRjG0U9SvCAN-Olj50UHAvLYQnQ7XitQDpfEZifjzv4nqPm6F6WBn9JG58Zs6qKBGDqfYPkN/s400/accordian.JPG" style="cursor: pointer; height: 120px; width: 400px;" /></a><br />
<br />
The file name will be ca_geekpower_accordianitem.xml file.<br />
<br />
The file contents are:<br />
</span><br />
<pre><span style="clear: both; display: block; float: none;"><?xml version="1.0" encoding="UTF-8"?>
<joomfish type="contentelement">
<name>Accordian Item</name>
<author>GeekPower</author>
<version>1.5</version>
<description>Definition for the Accordian component</description>
<reference type="content">
<table name="ca_geekpower_accordianitem">
<field type="referenceid" name="id" translate="0">ID</field>
<field type="titletext" name="title" translate="1">Accordian Item Name</field>
<field type="htmltext" name="content" translate="1">Content</field>
</table>
</reference>
</joomfish>
</span></pre><span style="clear: both; display: block; float: none;"><joomfish type="contentelement"> - this specifics that this is a content element. There may be more to it than that.<br />
<br />
<name>Accordian Item</name> - this is the name of this content element. This will appear in the translation administration section of JoomFish.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBm4wdpj_fBk6kj0JBkV9dKt3roOr8M2umFzARz9ljYyQyvOa_v59Z4xkZ_VakZnavdtCwtdHix8EJmVb48SBHtS3l0SwIcDCQDgpUy6mXzz9wHqhAfM5SW1Zk73TVz71AB4dB9O06zKTZ/s1600-h/translation-section.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418170736089165874" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBm4wdpj_fBk6kj0JBkV9dKt3roOr8M2umFzARz9ljYyQyvOa_v59Z4xkZ_VakZnavdtCwtdHix8EJmVb48SBHtS3l0SwIcDCQDgpUy6mXzz9wHqhAfM5SW1Zk73TVz71AB4dB9O06zKTZ/s320/translation-section.jpg" style="cursor: pointer; float: left; height: 185px; margin: 0pt 10px 10px 0pt;" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibbHgz2gif9ELHuJ_YC2S3dKV08Kq-ELpANwSl8hYBUVqGJKIWp1cBujzprEi7IuKWK4U35Lmh1Op69lcwHkbYvE7GoxZqmhxg-TIkmE-44lKcba7s2JhwH6h-WA6U8sU6G7iKGzAXpJGU/s1600-h/translation-content-elements.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418171218293035554" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibbHgz2gif9ELHuJ_YC2S3dKV08Kq-ELpANwSl8hYBUVqGJKIWp1cBujzprEi7IuKWK4U35Lmh1Op69lcwHkbYvE7GoxZqmhxg-TIkmE-44lKcba7s2JhwH6h-WA6U8sU6G7iKGzAXpJGU/s320/translation-content-elements.jpg" style="cursor: pointer; float: left; height: 185px; margin: 0pt 10px 10px 0pt;" /></a><br />
<span style="clear: both; display: block; font-size: 100%;">As you can see the name we provided is listed under the content elements.</span><br />
<br />
<span style="font-style: italic;"><reference type="content"></span> - not sure about this so we'll leave it as content.<br />
<br />
<span style="font-style: italic;"><table name="ca_geekpower_accordianitem"></span> - the name of the table.<br />
<br />
<span style="font-style: italic;"><field type="referenceid" name="id" translate="0">ID</field></span> - the primary key for this table. Translate is 0 because we don't need a translation or a different value.<br />
<br />
<span style="font-style: italic;">Note:</span><br />
Keep this in mind if you have columns that contain data that doesn't need a language translation but needs a different value. In that case translate will be 1. Example: the name of an image file which will need to change for the each language.<br />
<br />
<span style="font-style: italic;"><field type="titletext" name="title" translate="1"></span>Accordian Item Name</field> - title is header of the accordian time. Type of titletext makes the editable area an input text box. See the description of xml from above for more information on types. This is also the text that will appear in the Translation manager for listing the items.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFFxzDqVMN3LfyD7aLoaXbCXHcUwTC1nioRiWBDoTekCy5zCT2xHkZi3_G0WQ6Xn3KY7iI47sTI4fLSlcpTHn1Q4se_ytTo5Fj2yo0pRaor7y-oDrDwhz-cMvx2on-t0Sd9j2gBL5qjmSb/s1600-h/translation_title.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418260825433125778" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFFxzDqVMN3LfyD7aLoaXbCXHcUwTC1nioRiWBDoTekCy5zCT2xHkZi3_G0WQ6Xn3KY7iI47sTI4fLSlcpTHn1Q4se_ytTo5Fj2yo0pRaor7y-oDrDwhz-cMvx2on-t0Sd9j2gBL5qjmSb/s400/translation_title.JPG" style="cursor: pointer; height: 133px; width: 400px;" /></a><br />
<br />
<span style="font-style: italic;"><field type="htmltext" name="content" translate="1">Content</field></span> - content is the content of the item and htmltext displays an editor.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4tIoqsIohZJh_TLJp71iUahlf27JIIdv8vEygiVh14G5_c0QjzCojAD-DF6knNvG4F9dvc_SksUeGrBbP1avIThPRa8Pw52E0MWvXSkjhiDUspCj-AKPvnhX4WZSnhgouys0YNfwI_-Ur/s1600-h/translation_content.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418261246770238210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4tIoqsIohZJh_TLJp71iUahlf27JIIdv8vEygiVh14G5_c0QjzCojAD-DF6knNvG4F9dvc_SksUeGrBbP1avIThPRa8Pw52E0MWvXSkjhiDUspCj-AKPvnhX4WZSnhgouys0YNfwI_-Ur/s400/translation_content.JPG" style="cursor: pointer; height: 181px; width: 400px;" /></a><br />
<br />
Now that you have created this file, save it in the adminstrator/components/com_joomfish/contentelements folder.<br />
<br />
After we have saved the file in the folder we can now go into the <span style="font-style: italic;">admin section</span> -> <span style="font-style: italic;">Components </span>-> <span style="font-style: italic;">JoomFish</span> -> <span style="font-style: italic;">Translations </span>and from the right hand side <span style="font-style: italic;">Select A Language</span> -> <span style="font-style: italic;">Content Element</span>.<br />
<br />
We should see all our content listed with a state of a red dot meaning there is no translation and an x under published for not published.<br />
<br />
Now we can translate our content and put it live but .... it is most likely that our translations will not appear on the front-end.<br />
<br />
When JoomFish is installed it will intercept all database calls and using some magic ( basically I just haven't looked into it) will grab our translated content. <span style="font-style: italic;">IF</span> our sql queries are setup correctly.<br />
<br />
<a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046" name="second"><span style="font-weight: bold;">Second Step</span></a><br />
Anywhere we are retrieving content from our custom tables we need to retrieve the primary key. For us this is the id column. If we do make these changes but our translated content is not appearing then we need to look at <a href="http://www.joomfish.net/en/documentation/developer-docs/64-compatible-query-construction">compatible query construction</a> to make sure our query statements are in an acceptable format.<br />
<br />
That is all that is required to get JoomFish to recognize our component, translate it and display it.<br />
<br />
"But that fancy drop down menu for translating articles and menu's doesn't work for my component?", you are right! It doesn't work. But it can. There is a direct translation module for the admin section that controls what gets that fancy drop down menu.<br />
<br />
<span style="font-style: italic;">Admin </span>-> <span style="font-style: italic;">Extensions </span>-> <span style="font-style: italic;">Module Manager</span> -> <span style="font-style: italic;">Administrator</span> -> <span style="font-style: italic;">Direct Translation</span><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOPyUHuA-RJvzRnvSzR2guwdKfzMv-bgIYrdxXvRkK17Ia3BcDQDIM4T09dkEjvMpio-o3lhUMrYZAWfosvaq0MojBV8xt8rmRYMoRoW0Z_ni-ckwEVtElUNUD30dPc6LA0IvGjX6TkHRT/s1600-h/direct-translation-selection.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418179428920765746" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOPyUHuA-RJvzRnvSzR2guwdKfzMv-bgIYrdxXvRkK17Ia3BcDQDIM4T09dkEjvMpio-o3lhUMrYZAWfosvaq0MojBV8xt8rmRYMoRoW0Z_ni-ckwEVtElUNUD30dPc6LA0IvGjX6TkHRT/s200/direct-translation-selection.jpg" style="cursor: pointer; float: left; height: 155px; margin: 0pt 10px 10px 0pt; width: 200px;" /></a><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjomBXjloh4-Oz0g10-7XmBE7oAMoToa6dKEz2N97Z0hwofyREdRTZOciNoiIZuCsxrbNh-SHYTNxWjFzlKFmTWhdkrDKb5rIEJulAb2D6XBXG9XQV2X3BdFVzK90jpaBxpB_E8Wp9XzkGk/s1600-h/direct-translation-component-parameter.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418179635844981858" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjomBXjloh4-Oz0g10-7XmBE7oAMoToa6dKEz2N97Z0hwofyREdRTZOciNoiIZuCsxrbNh-SHYTNxWjFzlKFmTWhdkrDKb5rIEJulAb2D6XBXG9XQV2X3BdFVzK90jpaBxpB_E8Wp9XzkGk/s200/direct-translation-component-parameter.jpg" style="cursor: pointer; float: left; height: 61px; margin: 0pt 10px 10px 0pt; width: 200px;" /></a><br />
By adding a line to the components we can tell the direct translation module which components and which views of a component to display the drop down list.<br />
<br />
<br />
<br />
<a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046" name="third"><span style="font-weight: bold;">Third Step</span></a><br />
The line we'll use is: com_accordian#ca_geekpower_accordianitem#id#controller#items#task#!edit<br />
<br />
<span style="font-weight: bold;">First Part</span><br />
... is the component name<br />
<br />
<span style="font-weight: bold;">Second Part</span><br />
... is the table name<br />
<br />
<span style="font-weight: bold;">Third Part</span><br />
... is the variable that holds the primary key of the item to translate. For the direct translation to work there has to be a way to check which item will be translated. Each of my items have a checkbox in front of them. The name of the checkbox is id[]. We only have to pass id because the Direct Translation Module (mod_translate.php) adds the [] to id.<br />
<br />
Using firebug we can see that the checkboxes have id[] as the name.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip22rDa6PEwsmset33twNCOvbl77KLZBZVB5Guthb6PNqxU7191iLY_C-hmabOU_s-5nwptzPZYFS1HiaHl72OotVuW8wsh5PjRXjlISCkymZr1xLRrB9kSzlrGo2Wv0I9-zZReYnqTBkl/s1600-h/accordian_item_manager_firebug.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418265227884946658" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip22rDa6PEwsmset33twNCOvbl77KLZBZVB5Guthb6PNqxU7191iLY_C-hmabOU_s-5nwptzPZYFS1HiaHl72OotVuW8wsh5PjRXjlISCkymZr1xLRrB9kSzlrGo2Wv0I9-zZReYnqTBkl/s400/accordian_item_manager_firebug.JPG" style="cursor: pointer; height: 201px; width: 400px;" /></a><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKfy7Pb_1enYraE9tkCtITFu2WVAOsCgSL_SVGvRlOyV5EtBKT7oZZ5KAkIgk9KDDWJ_fkusRYM6Tn9W6XkSGXwHXh0maQcdBElL90jK0XHcmU5Rx9uhVhE8OMHWFi5TdV0fWegrKcD19T/s1600-h/accordian_item_manager_firebug_id.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5418266357954438482" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKfy7Pb_1enYraE9tkCtITFu2WVAOsCgSL_SVGvRlOyV5EtBKT7oZZ5KAkIgk9KDDWJ_fkusRYM6Tn9W6XkSGXwHXh0maQcdBElL90jK0XHcmU5Rx9uhVhE8OMHWFi5TdV0fWegrKcD19T/s400/accordian_item_manager_firebug_id.JPG" style="cursor: pointer; height: 31px; width: 400px;" /></a><br />
<span style="font-size: 85%; font-style: italic;">Note: You may need to click on the image</span><br />
<br />
<span style="font-weight: bold;">Forth and beyond Parts</span><br />
After the third part we get into the interesting stuff. Our component may have many views and each view uses a different table or certain views we do not want to allow any translations.<br />
<br />
<span style="font-weight: bold;">Filtering</span><br />
The additional values represent name/value pairs in the URL. Our values ( controller#items #task#!edit ) indicate that for a parameter called <span style="font-style: italic;">controller </span>it must have a value of <span style="font-style: italic;">items </span>and for the parameter <span style="font-style: italic;">task </span>is must not be the <span style="font-style: italic;">edit </span>task.<br />
<br />
<span style="font-style: italic;">Note:</span><br />
The ! is the only operator that can be added to a value.<br />
<br />
<a href="http://www.blogger.com/post-edit.g?blogID=770138064171600577&postID=9044646550030716046" name="finished"><span style="font-weight: bold;">Finished!</span></a><br />
So hopefully that helps you on how to add JoomFish support to your custom components.</span>Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-19830241315265889982009-05-30T12:42:00.000-07:002009-05-30T12:49:02.254-07:00ConvocationWell convocation is coming up and I have accepted the honour of valedictorian. I now need to find time around my new job to write up a speech. I also keep adding tasks to my calendar to get back into my Mozilla Project but life keeps eating up my time. I don't know where you guys find the time. Do you have a magic box and when you need more time you just reach in and pull it out? Hit a reset button? Wiggle your nose? <br /><br />Please, please share your secret.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-31155711503681357932009-04-30T11:07:00.000-07:002009-04-30T11:19:09.027-07:00After Graduation ...It has been awhile since I have posted on this blog. My final project required a lot of my time. My final project was an Online Ordering System for a comic book store. We used ASP.NET, C#, and MySQL. The team was also working on a Point of Sale system so we divided the work among the four of us. I did the back end logic for the Website and another guy did the Look and feel.<br /><br />The hardest part of this project was implementing PayPal. The owner wanted PayPal as the means of payment. I had to do a lot of reading on the PayPal site and research to find the right solution for our site. Trouble shooting was a little difficult also. In the end, a customer could place an order and receive a receipt of the order from the store plus PayPal.<br /><br />Now I'm looking for a job. I'm trying not to look for any job but a job that will align with my values, strengths and skills. The University of Waterloo has a <a href="http://www.cdm.uwaterloo.ca/step1.asp">Self-Assessment guide</a> that is available to anyone. I have been going through it and I know myself better because of this assessment. I also joined a Job Finding Club that is being offered through Seneca. I hope to improve on my interview skills and learn techniques for tapping into the hidden job market.<br /><br />It was a little hard to get back into groove after Kaitlyn was born still in January but I feel that I am back at 100%. My wife is still working through the process and has decided to look for work also. She has her own <a href="http://lifesincekaitlyn.blogspot.com/">blog</a> where she is blogging about her experience.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-11266620995834917932008-12-09T19:28:00.001-08:002008-12-09T19:37:40.169-08:000.3 ReleaseSo this is my last contribution to the OSD 600 Course but not my last contribution to my project. With this release I will be slowing down my activity but I hope I find the time to finish what I have started.<br /><br /><span style="font-weight:bold;">0.3 Release Details</span><br />My 0.3 Release project release can be found <a href="http://zenit.senecac.on.ca/wiki/index.php/PGO_Related_Bugs#0.3_Release">here</a>.<br /><br />The summary is I have landed a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=465592">patch </a>that keeps PGO for Thunderbird breaking on Windows. A module in the mozilla-core called lcms breaks when it is not linked into the xul library. The patch basically disables pgo for that module if it is not being linked into the library otherwise pgo is enabled for it.<br /><br />As I was trying to enable pgo for Thunderbird related modules I discovered that PGO gets enabled for all modules. This was good news until I noticed that only 5 modules were getting optimized out of 74. <br /><br />As I looked into this it turned out that the folder that most of the profile data was in was being deleted before used to optimize the modules. I created a new <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=468285">bug</a> for this problem. <br /><br />I have added my proposed patch and using that patch and doing some simple profiling 69 of 74 modules were optimized.<br /><br />And that is my 0.3 Release.<br /><br />I have learned about using Make and Python and compiler options for PGO. I still don't understand PGO entirely and don't understand why it does what it does. Example would be when using the option to optimize for size the compile spits out that the module was optimized for speed. I guess at some point I should make an inquiry on the Microsoft forums.<br /><br />I plan on taking the OSD700 class but am looking at working with Eclipse.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-25583864561590067512008-12-08T09:45:00.000-08:002008-12-08T09:50:42.182-08:00Thunderbird components getting OptimizedSo the problem I ran into with optimizing Thunderbird was all the profile data was getting deleted before it was used. I opened a new <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=468285">bug</a> for this. <br /><br />The other part of the problem was the python script, pgomerge.py, was not looking in the objdir/dist/bin/components for the profile data. So I have edited the pgomerge.py file and it does find and merge in all the profile data.<br /><br />AWESOME!!!<br /><br />New problem...the profile data in the dist/bin is not getting touched. I pretty sure my script is broken.<br /><br />Time to look into this python stuff some more.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-75460463513584908882008-12-06T18:43:00.000-08:002008-12-06T18:50:49.792-08:00New Bug for PGOI've been trying to enable pgo on different Thunderbird components but I've been having problems.<br /><br /><span style="font-weight:bold;">Problem</span> <br />The build output says these files are compiled with optimization flags but no optimization data is being collected.<br /><br />It turns out the data is being collected and placed in the objdir/dist/bin/components directory. BUT!!!! This folder gets deleted.<br /><br />I told ted about this. Here is a paraphrase of our <a href="http://zenit.senecac.on.ca/wiki/index.php/PGO_Related_Bugs#Conversations">conversation</a>.<br /><br />Basically, i need a flag to tell the make not to delete the folder when second profile build is being done and to look in the right directory for the optimization files.<br /><br />I have posted a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=468285">bug </a>about this. This will be interesting to see how many components will get optimized without breaking.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-35822210422215197402008-12-06T08:54:00.001-08:002008-12-06T09:11:58.194-08:00Patch Landed!My Patch has made it into mozilla-central. <br />Here is the <a href="http://zenit.senecac.on.ca/wiki/index.php/PGO_Related_Bugs/Patches">patch</a>.<br />Here is the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=465592">bug</a>.<br />Here is my <a href="http://www.youtube.com/watch?v=d7EcKWzg5_s">happy dance</a>.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-1473659050650653182008-12-05T16:14:00.000-08:002008-12-05T16:21:05.583-08:00Patch Reviewed!Sweet! My patch was reviewed.<br /><br />I just have to fix the comments in the patch and it is good to go.<br /><br />I'm not sure what to do after I attach the updated patch. <br />This is the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=465592 ">bug</a>.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-42850059719603115252008-12-05T13:50:00.000-08:002008-12-05T13:56:46.840-08:00Optimizing the Thunderbird Address Book - cont'd.I am still attempting to generate some optimization data for the address book.<br /><br /><span style="font-weight:bold;">One Success</span><br />The address book objects were compiled with the speed optimization. I must not have been hitting any <code>xpcom</code> calls to the <code>c++</code> code. The opening and closing of windows must have been all <code>js</code> and <code>xul</code> code.<br /><br />I'm looking through the <code>c++</code> code to see what functions are available. I am going to try and profile to hit these functions. I also am trying to enable speed optimizations for the entire <code>mail.dll</code> in the Makefile in the <code>mail.dll</code> directory. This might not work.<br /><br /><span style="font-weight:bold;">Note:</span><br />I also notice that when I turn on PGO for Thunderbird that all the modules get the default optimization which is the size optimization.<br /><br />I will have to build a non-pgo build of Thunderbird to see if it makes a difference.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-56544319597150153272008-12-04T19:58:00.000-08:002008-12-04T20:05:55.548-08:00Optimizing the Thunderbird Address Book.I did a quick edit for the Makefile.in file for the address book in the Thunderbird source. I was hoping this would enable pgo for this module.<br /><br />Here is the <a href="http://zenit.senecac.on.ca/wiki/index.php/PGO_Build_Details/TB-Addrbook">diff</a> for the changes I made.<br /><br />I was able to successfully build thunderbird with these options but during the profiling no optimization data was collected. If data is collected a <code>.pgc file</code> is created. This library is added into the <code>mail.dll</code> so a <code>mail.pgc file</code> should have been created. None was.<br /><br />I haven't looked at my build output to confirm that the library and <code>mail.dll</code> were compiled with the optimizations. I did notice that <code>mail.dll</code> library was compiled with the instrumental option. This means the <code>mail.dll</code> had the extra instructions to collect profile data. It is possible that my profiling did not actual affect the address book.<br /><br />I hope to get some more information before my 0.3 is released.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-66492794249280214892008-12-02T13:02:00.000-08:002008-12-02T13:13:28.244-08:00Patch Review ProcessI've had my patch posted for about a week and still haven't not had a review. So I decided to jump on IRC and try and ask for a review.<br /><br />My Project is PGO and apparently there is only one guy who owns that sort of code, Ted Mielczarek. I sent a private message to Ted and an open message on the <code>#maildev</code> channel to see if I could get a review. Ted responded that he is working on his review queue and would be getting to my patch. On the <code>#maildev</code> channel Standard8 pointed me to Ted.<br /><br />So it all rests with Ted.<br /><br />I was nervous posting on IRC or messaging Ted because I still don't understand the etiquette of that sort of thing. But everyone responded nicely which makes me feel better.<br /><br />This experience with IRC is helping me feel better about asking questions from people I don't know.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-41922726221555372162008-11-30T12:37:00.000-08:002008-11-30T12:42:26.082-08:00Seneca How-To PageFor contribution marks I created a <a href="http://zenit.senecac.on.ca/wiki/index.php/How-Tos">How To</a> Page on the Seneca Wiki. This How to page will have walkthroughs and tutorials for all the open source projects Seneca is working on.<br /><br />Right now I have step by step instructions for how to run different tests on Firefox. Others might add how to write a test.<br /><br />I tried to make the walkthroughs nicer looking than black on white. It is not necessary for people to follow my lead but adding a little extra flare is always nice.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-81703171987179131392008-11-26T16:50:00.000-08:002008-11-26T19:11:47.974-08:00PGO PatchI have submitted a patch to for the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=465592">bug 465592</a>. <br /><br /><span style="font-weight:bold;">The Bug</span><br/><br />Currently PGO doesn't work for Thunderbird. For Windows builds the compilation breaks in the LCMS module for the Mozilla core. If PGO is disable for this module then Thunderbird can be built with PGO enabled.<br /><br /><span style="font-weight:bold;">The Patch</span><br/><br />After talking with David Humphrey and Ted Mielczarek I modified the Makefile.in in the module/lcms/src directory. To include the following lines.<br/><br /><pre>ifndef MOZ_ENABLE_LIBXUL<br />NO_PROFILE_GUIDED_OPTIMIZE = 1<br />endif<br /></pre><br />The MOZ_ENABLE_LIBXUL flag is used to link libraries into a single xul.dll library. On Firefox this flag is used and a number of libraries are linked in the xul.dll, one of these libraries is the mozlcms.lib. This does not happen with Thunderbird. Instead the libraries are made into DLL's. The mozlcms.dll crashes during the optimization build for PGO.<br/><br/><br />Checking if the flag has not been set means that the mozlcms.lib will be made into a DLL. Since this will crash if PGO is enabled, the NO_PROFILE_GUIDED_OPTIMIZE is set to disable PGO for this one module.<br /><br /><span style="font-weight:bold;">The Result</span><br/><br />Well, it works otherwise I would not have posted the patch. I am waiting on a review.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-9044239166277882632008-11-24T17:54:00.000-08:002008-11-24T18:09:58.632-08:00Understanding Thunderbird Build ProcessI've been reading the Makefiles for Thunderbird to understand how it compiles. My interest is in the Mozilla core module lcms. <br /><br />I'm trying to understand if it is possible to disable PGO for that module through the Thunderbird Makefiles instead of modifying the lcms Makefile.<br /><br />I notice that the flag LCMS_CFLAGS=-DLCMS_DLL is set in the Makefile in the Mozilla core that gets downloaded when using the client.py file. This flag is not set in the Mozilla core when checking out Firefox.<br /><br />Talking to David Humphrey he mentioned a flag MOZ_ENABLE_LIBXUL. This flag was set in my build output for the Firefox build but not in the Thunderbird build.<br /><br />In the build output for Thunderbird I noticed that the lcms objs are combined into a mozlcms.dll and in the Firefox build lcms objs are combined into a lib and later it is combined with the xul.dll.<br /><br />Options for disabling PGO for the LCMS module:<br /><span style="font-weight:bold;">Option1:</span><br /><br />A flag could be added in the makefile for the lcms module that will enable or disable PGO. But I would prefer not to modify the Mozilla Core files.<br /><br /><span style="font-weight:bold;">Option2:</span><br /><br />After the mozilla core is built, could use another script to build the lcms module again but this time as a lib and re-compile the xul.dll and add the mozlcms.lib into the xul.dll. But this is kind of a hack.<br /><br />I'll keep looking at it and asking the guys "who know" the best way to proceed.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-51166350716194980082008-11-19T16:11:00.000-08:002008-11-19T16:17:36.289-08:00Let's start a converation!!I've posted a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=465592">bug </a>for Thunderbird to start a conversation on the best way to approach enabling PGO for Thunderbird.<br /><br />Currently I have to modify a file in the Mozilla core to enable PGO for Thunderbird and I shouldn't have to. I am looking into how to modify the Thunderbird build process so it can successfully compile without modifying the Mozilla core.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-55248696374645116502008-11-15T19:07:00.000-08:002008-11-15T19:25:14.928-08:000.2 ReleaseI have released my <a href="http://zenit.senecac.on.ca/wiki/index.php/PGO_Related_Bugs#0.2_Release">0.2 Release</a>.<br /><br />I am happy to say that I have successfully built Thunderbird with PGO enabled. A closed bug has been opened as I continue to for on this. The problem is that code in the Mozilla core needs to be modified for Thunderbird to compile with PGO but Firefox which uses the same code does not.<br /><br /><span style="font-weight:bold;">Looking Ahead</span><br />For 0.3 Release I want to figure out how to modify the Thunderbird make files to correct the pgo related issue without modifying the Mozilla core.<br /><br />If I have time I want to enable PGO for modules specific to Thunderbird.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-13424712152477748532008-11-07T12:37:00.000-08:002008-11-07T13:55:12.649-08:00Success!!!!I have successfully compiled Thunderbird with PGO.<br /><br />I had to disable pgo for the Color Management module.<br />I included <code>NO_PROFILE_GUIDED_OPTIMIZE = 1</code> right before the line that indicated what optimization this module is to have.<br /><br /><span style="font-weight:bold;">The Problem</span><br />I was receiving an internal linker error when the compiler was trying to optimize the mozlcms.dll. The error that was displayed was <code>f:\mozilla\thunderbird\mozilla\modules\lcms\src\cmscgats.c (...) LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage</code>. I blogged about this <a href="http://dee132.blogspot.com/2008/11/so-close.html">error</a>.<br /><br /><span style="font-weight:bold;">Steps to Resolve</span><br />At first I was compiling with VS 2008 which broke my original Firefox build. I figured that was the problem. I decided to create a VM of Windows 2003 and setup an environment as close as I could to the tinderboxes.<br /><br />I installed Visual Studio 2005, VS 2005 SP1, and the Vista SDK. I tried to compile again and I received the same error. At this point I figured it was the Vista SDK since the environment I used with VS 2008 also had Vista SDK. So.....I have an environment that has Visual Studio 2005 without the Vista SDK.<br /><br />I still got the error.<br /><br />At this point I decided that I would disable that one module and hoped it all goes well.... and it DID!!!<br /><br />In between I tried a bunch of other things that had no affect so I won't mention them but I have been compiling and compiling and installing and installing since Monday.<br /><br /><span style="font-weight:bold;">Details</span><br />A <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=448515">bug </a>has been re-opened and I have posted to it.<br /><br />I noticed that Thunderbird creates 27 DLL's in the dist/bin directory and Firefox creates 17 DLL's in the same directory.<br /><br />The xul.dll file is 10x larger for Firefox than Thunderbird.<br /><br />I'll post more details about what objects were optimized and what percentages they were optimized. I accidentally blew away my last build.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com1tag:blogger.com,1999:blog-770138064171600577.post-3646611238727994352008-11-03T15:39:00.000-08:002008-11-03T15:49:42.788-08:00So Close!I appears that the enabling of PGO for Thunderbird might be really easy. All I had to due was change the Thunderbird client.mk file to include the profiledbuild option that is available in the Firefox client.mk file.<br /><br />Thunderbird has a clone of the mozilla-central source which already has PGO enabled for individual modules. <br /><br />To turn it own all that really happens is the setting of two environment variables.<br /><br /><pre><br />####################################<br /># Profile-Guided Optimization<br /># To use this, you should set the following variables in your mozconfig<br /># mk_add_options PROFILE_GEN_SCRIPT=/path/to/profile-script<br />#<br /># The profile script should exercise the functionality to be included<br /># in the profile feedback.<br />#<br /># This is up here, outside of the MOZ_CURRENT_PROJECT logic so that this<br /># is usable in multi-pass builds, where you might not have a runnable<br /># application until all the build passes and postflight scripts have run.<br />ifdef MOZ_OBJDIR<br /> PGO_OBJDIR = $(MOZ_OBJDIR)<br />else<br /> PGO_OBJDIR := $(TOPSRCDIR)<br />endif<br /><br />profiledbuild::<br /> $(MAKE) -f $(TOPSRCDIR)/client.mk build MOZ_PROFILE_GENERATE=1<br /> OBJDIR=${PGO_OBJDIR} $(PROFILE_GEN_SCRIPT)<br /> $(MAKE) -f $(TOPSRCDIR)/client.mk maybe_clobber_profiledbuild<br /> $(MAKE) -f $(TOPSRCDIR)/client.mk build MOZ_PROFILE_USE=1<br /><br /></pre><br /><br />So the first build has the environment variable MOZ_PROFILE_GENERATE=1 set. This causes a instrumental build to be built. This is used for profiling and gathering performance data. Then a script is run to profile the build. After some clean up it is built again with the performance data included. The environment variable MOZ_PROFILE_USE=1 indicates that.<br /><br />But alas my build failed. It created the first build and opened Thunderbird but the second build failed. It looks like a compiler error. I have seen the error before but I cannot remember what caused it.<br /><br /><pre>f:\mozilla\thunderbird\mozilla\modules\lcms\src\cmscgats.c(875) : fatal error C1001: An internal error has occurred in the compiler.<br />(compiler file 'f:\rtm\vctools\compiler\utc\src\P2\main.c[0x10CA10D0:0x00000008]', line 182)<br /> To work around this problem, try simplifying or changing the program near the locations listed above.<br />Please choose the Technical Support command on the Visual C++ <br /> Help menu, or open the Technical Support help file for more information<br /><br />LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage<br /><br /> Version 8.00.50727.42<br /><br /> ExceptionCode = C0000005<br /> ExceptionFlags = 00000000<br /> ExceptionAddress = 10CA10D0 (10B00000) "f:\Program Files\Microsoft Visual Studio 8\VC\BIN\c2.dll"<br /> NumberParameters = 00000002<br /> ExceptionInformation[ 0] = 00000000<br /> ExceptionInformation[ 1] = 00000008<br /><br />CONTEXT:<br /> Eax = 00000000 Esp = 0012ED28<br /> Ebx = 00000015 Ebp = 0012ED3C<br /> Ecx = 028DDA01 Esi = 02866060<br /> Edx = 0297AE12 Edi = 00000000<br /> Eip = 10CA10D0 EFlags = 00010246<br /> SegCs = 0000001B SegDs = 00000023<br /> SegSs = 00000023 SegEs = 00000023<br /> SegFs = 0000003B SegGs = 00000000<br /> Dr0 = 00000000 Dr3 = 00000000<br /> Dr1 = 00000000 Dr6 = 00000000<br /> Dr2 = 00000000 Dr7 = 00000000<br />make[6]: *** [mozlcms.dll] Error 232<br />make[6]: *** Deleting file `mozlcms.dll'<br />make[6]: Leaving directory `/i/mozilla/thunderbird/tb-pgo/tb/mozilla/modules/lcms/src'<br />make[5]: *** [libs] Error 2<br />make[5]: Leaving directory `/i/mozilla/thunderbird/tb-pgo/tb/mozilla/modules/lcms'<br />make[4]: *** [libs_tier_external] Error 2<br />make[4]: Leaving directory `/i/mozilla/thunderbird/tb-pgo/tb/mozilla'<br />make[3]: *** [tier_external] Error 2<br />make[3]: Leaving directory `/i/mozilla/thunderbird/tb-pgo/tb/mozilla'<br />make[2]: *** [default] Error 2<br />make[2]: Leaving directory `/i/mozilla/thunderbird/tb-pgo/tb/mozilla'<br />make[1]: *** [default] Error 2<br />make[1]: Leaving directory `/i/mozilla/thunderbird/tb-pgo/tb'<br />make: *** [build] Error 2<br /></pre><br /><br />So close....Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-84717329559738663362008-11-01T18:22:00.000-07:002008-11-01T18:30:06.969-07:00Thunderbird Testing EnvironmentI downloaded from Seneca a copy of Windows 2003 using the key provided to me through Seneca. On my XP machine using Virtual Box I have created a VM for win2k3. <br /><br />I've been reading up and it looks like there is no real testing for Thunderbird. Currently the tinderboxes check to see if the code compiled and as long as it compiles everything is ok.<br /><br /><span style="font-weight:bold;">MailDev</span><br />I was chatting with some fella's and it turns out they have a few leak tests and Standard8 is working on the Tp tests ( performance startup tests ). Since I'll need some performance tests to verify my findings I'll probably be contributing those too.<br /><br /><span style="font-weight:bold;">Where I am!</span><br />I am trying to setup my win2k3 VM with the right patches and updates so I can duplicate the tinderboxes. I also need to install Visual 2005 with the Vista SDK and any patches mentioned on the Reference Platforms page on the <a href="https://wiki.mozilla.org/ReferencePlatforms/Win32">Mozilla Wiki</a>.<br /><br /><span style="font-weight:bold;">Next!</span><br />Start looking into enabling one module to use PGO for Thunderbird. The good stuff.<br /><br /><p ><br />Time to put the nose to the grind.<br /></p>Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-67257047122730689062008-10-28T19:26:00.000-07:002008-10-28T19:33:57.821-07:00New Focus for PGO ProjectFor the rest of my PGO project I'll be focusing on adding PGO to Thunderbird. So my first task is to build Thunderbird. Since I'll be building and testing a lot I have scripts to automate this task for me. I just tweaked my scripts to now build for Thunderbird. <br /><br /><span style="font-weight:bold;">Bash Script Problems</span><br />I don't know why but when I tried to create a bash script from scratch it would behave as if it executed, as in no bash could find command error, but nothing would happen. I could get any output. So I copied an existing working script and modified it. Works for me.<br /><br /><span style="font-weight:bold;">Next Steps</span><br />Now that I can build Thunderbird I am going to try and replicate the Mozilla tinderbox setup for Thunderbird on my home machine so I can duplicate the performance testing environment. Once I have a baseline of how Thunderbird performs on my machine I can then start enabling PGO and see what kind of performance boost I get.<br /><br />After that I would have lots of opportunities for other Seneca students to contribute by compiling and running the tests on their machines to see if they are also seeing a performance gain.<br /><br />So now to get to it.....Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-16516682501497974152008-10-17T13:13:00.000-07:002008-10-17T13:27:39.716-07:000.1 Release - Firefox PGO0.1 Release is done. <br /><br /><span style="font-weight:bold;">I have learned:</span><br /><blockquote><br /> How to implement PGO on any application.<br /> How to turn PGO on and off for modules in Firefox.<br /> That profiling firefox anymore than opening and closing the browser doesn't yeild better performance.<br /> How to run xpcshell, mochitest, and reftests on a Firefox build.<br /> How to create bash scripts to build firefox and create reports from the build output.<br /> How to reproduce the sqlite bug as report in this <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=419893">bug</a>.<br /> How to attach my results of test to a bug.<br /> That sqlite crashes even in a stand alone application when compiled with PGO.<br /> That I am going to turn my focus to Thunderbird and turn on PGO for Windows/Linux/Mac.<br /></blockquote><br /><a href="http://zenit.senecac.on.ca/wiki/index.php/PGO_Related_Bugs#0.1_Release">0.1 Release</a> more detailed look<br /><br /><span style="font-weight:bold;">Experience</span><br />I have found myself frustrated, upset, surprised and excited as I work my way into the Mozilla Community. I am asking questions more openly, more willing to look dumb in the hopes of getting the information I need. I always search first, of course.<br /><br />It really takes time to get a feel for how Mozilla does things. I just recently discovered that the trunk has all these readme's scattered everywhere. Probably the first place to look for help.<br /><br />I still find the Mozilla wiki's and documentation to be lacking for someone who is not as experienced as the folks at Mozilla. I tell my wife that "it's documentation written for people who already know it". I find I have to research and look stuff up to understand what I read on Mozilla.<br /><br />Now that I have my feet wet I am excited to push forward.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-22394858990852606162008-10-11T08:43:00.000-07:002008-10-11T09:08:26.644-07:00Review of PGO Data<span style="font-weight: bold;">45% increase not a result of PGO profiling of Google Maps.</span><br /><br />I used build Firefox with only profiling of a page opening and then closing to check it against the loading times for Google Maps.<br /><br />I re-ran all the tests and here is the summary of the results:<br /><div style="display:table;border-style:dashed"><br /> <div style="display:table-row"><br /> <div style="display:table-cell;width:120px"><br /><span style="font-weight:bold;">Firefox 3.0.3</span><br /> </div><br /><div style="display:table-cell;width:120px"><br /><span style="font-weight:bold;">Minefield PGO *</span><br /> </div><br /> <div style="display:table-cell;width:120px"><br /><span style="font-weight:bold;">Minefield PGO **</span><br /> </div><br /> </div><br /> <div style="display:table-row"><br /> <div style="display:table-cell"><br />2.15s (avg)<br /> </div><br /> <div style="display:table-cell"><br />1.18s (avg)<br /> </div><br /><div style="display:table-cell"><br />1.17s (avg)<br /> </div><br /> </div><br /></div><br /><br /><span style="font-weight:bold;">* </span>Profiled using the Google Maps website.<br /><span style="font-weight:bold;">** </span>Profiled with only the browser opening then closing.<br /><br />I also saved the Google Maps page on to my local server and when the pages were served from a local server the load times were all identical.<br /><br />Serving Google Maps locally resulted in non of the javascript files Google Map uses being saved since they are loaded dynamically.<br /><br />I have to conclude from this second performance test that minefield has some performance improvements not seen in Firefox 3.0.3 since the profiling did not improve Google Maps site loading.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com0tag:blogger.com,1999:blog-770138064171600577.post-57413670665534172762008-10-10T17:20:00.000-07:002008-10-10T17:38:40.094-07:00Firefox PGO DetailsAccording to the build output:<br /><ul><li>2938 objects are created</li><li>2246 of the 2938 objects are created with pgo optimizations</li><li>2101 of the 2246 objects are optimized for size</li><li>145 of the 2246 objects are optimized for speed</li><li>73 objects are optimized with profile data</li><li>69 of 73 objects didn't have any profile data to optimize with</li><li>49 of 73 objects are tests objects</li></ul>In the end only 4 objects are optimized.<br /><pre><br />Merging ..\..\dist\bin\js3250!1.pgc<br />882 of 2904 ( 30.37%) profiled functions will be compiled for speed<br /><br />Merging ..\..\dist\bin\xul!1.pgc<br />3433 of 84021 ( 4.09%) profiled functions will be compiled for speed<br /><br />Merging ..\..\dist\bin\xpcom!1.pgc<br />55 of 55 (100.00%) profiled functions will be compiled for speed<br /><br />Merging ..\..\dist\bin\firefox!1.pgc<br />61 of 61 (100.00%) profiled functions will be compiled for speed<br /></pre>Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com1tag:blogger.com,1999:blog-770138064171600577.post-57819674924691702962008-10-10T15:36:00.000-07:002008-10-10T16:17:33.461-07:00More PGO Testing<big><em>45%</em></big> Increase in the loading of maps.google.com. I profiled Google Maps by running a few searches.<br /><br />I used a website called <a href="http://www.webwait.com">WebWait</a>. It calculates the load time for a webpage. Of course internet lag will play apart but the numbers were pretty close to each other.<br /><br />The data I collected is <a href="http://zenit.senecac.on.ca/wiki/index.php/PGO_Pref_data_here">here</a>.<br /><div style="border-style:solid;border-width:thin"><br />Google Maps - 45% faster ( was profiled )<br />CNN.com - 21% faster ( was profiled )<br />tomshardware.com - the same ( was not profiled )<br /></div><br />I need to look into setting up talos to find out if doing profiling actually speeds up some aspects of Firefox or not.<br /><br /><span style="font-weight:bold;">Next</span><br />Create a script to build multiple PGO's during the night. Each PGO will do different profiling. Example. go to just cnn.com or just maps.google.com or just sunspider javascript test.Chris Bishophttp://www.blogger.com/profile/13788061501169252544noreply@blogger.com1