My favorites | Sign in
Google
                
Search
for
Updated Dec 23, 2009 by bmcqu...@google.com
ContributingCode  
How to contribute to Page Speed

Getting started

Here is a suggested procedure for getting started with the Page Speed codebase:

  1. Install Page Speed.
  2. Run Page Speed on a few websites, and see what the tool recommends.
  3. Read the documentation on the rules for which a page gets a bad score, and see if you can figure out how to improve the page.
  4. Check out a copy of the source.
  5. Look at the code for a rule. A simple rule is implemented in the file cssExpressionLint.js. Read this file, and figure out what the call to PAGESPEED.LintRules.registerLintRule() does by looking in lint.js.
  6. To debug Page Speed, use the function PS_LOG, which prints log messages. To see the messages, you also need to set two Firefox preferences: see https://developer.mozilla.org/en/DOM/window.dump, and follow the instructions to enable dump(). Also set the preference extensions.PageSpeed.enable_dump_logging to True. The first few lines of util.js define PS_LOG, and the last few read the preference you just set.
  7. Take any issue from our bug tracker to get a good introduction to the codebase.
  8. Build the code, as described in How to Build XPI.
  9. Submit your changes for code review, as described in Code Review Help.
  10. Sign a license agreement, as described below.

Making a larger contribution

Before you start working on a larger contribution you should get in touch with us first through the Page Speed discussion mailing list.

Signing the license agreement

Before we can use your code you have to sign the Google Individual Contributor License Agreement, which you can do online. This is mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things, for instance that you'll tell us if you know that your code infringes on other people's patents. You don't have to do this until after you've submitted your code for review and a member has approved it, but you will have to do it before we can put your code into our codebase.

Contributions made by corporations are covered by a different agreement from the one above, the Software Grant and Corporate Contributor License Agreement.


Sign in to add a comment