by Jean-Francois Ducarroz <ducarroz@netscape.com>
last modified March 5th, 2001 14:43
In order to be able to measure where we spend our time when creating a new message compose window or when replying to a message, I have added logging information to both the tip build and the mailnews performance branch build. With this loggin, you will be able to gather information on all platforms and on a variety of machines. Also you can track progress or degradation between builds or between the tip and the performance branch.
I have split the process of creating a new message (or doing a reply/reply all) in the following steps:
The log generated by a tip build and a branch build differs slightly
due to an architecture change but you are still able to compare the total
time and the time for every step even if they are not occurring in the
same order.
Here is a sample log:
How to create a Message Compose Performance Log: (adaptation of original document written by Lisa Chiang)
For all platforms, you'll need to edit your prefs.js file in your user directory (make sure you do this when Mozilla isn't running):
Add this line in:
user_pref("mailnews.logComposePerformance", true);
Then, follow these instructions for each platform:
Windows 95/98
: Create "c:\tmp" for the log
file to reside in if the directory does not exist. Insert the following
lines into your autoexec.bat file:
The 5 in the first variable above specifies the level of logging you want - the lower the number the less logging happens. (Temporarily, though, until further notice, it's going to use PR_LOG_ALWAYS.)Set NSPR_LOG_MODULES=msgcompose:5WinNT: Use the Control Panel | System | Environment tool to set the PRLOG env variables.
Set NSPR_LOG_FILE=c:\tmp\[filename]The filename can be defined by you. Reboot.
Variables: NSPR_LOG_MODULES Value: msgcompose:5Mac: Create a text file that contains the desired commands in a text editor such as BBEdit:
Variables: NSPR_LOG_FILE Value: c:\tmp\[filename]Follow the remaining steps for Windows 95/98 above.
ARGS: -mailUnix (e.g., for csh shells): Add the following lines to ~/.cshrc file of the csh shell:
ENV:NSPR_LOG_MODULES=msgcompose:5
ENV:NSPR_LOG_FILE=[filename]The filename can be defined by you. Save this file and drag and drop this file on the Netscape/Mozilla application icon. The log file is created in the seamonkey folder.
setenv NSPR_LOG_MODULES msgcompose:5
setenv NSPR_LOG_FILE /u/[unix userlogin]/tmp/[filename]The filename can be defined by you.
The numbers are supposed to have the following meaning:
PR_LOG_NONE = 0, /* nothing */
PR_LOG_ALWAYS = 1, /* always printed */
PR_LOG_ERROR = 2, /* error messages */
PR_LOG_WARNING = 3, /* warning messages */
PR_LOG_DEBUG = 4, /* debug messages */
On all platforms, the log is written over every time you re-launch the mail application.