Closed
Bug 99146
Opened 23 years ago
Closed 23 years ago
reduce the work we do in opt builds when we aren't logging compose performance numbers
Categories
(MailNews Core :: Composition, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: sspitzer, Assigned: vparthas)
Details
Attachments
(5 files)
4.74 KB,
patch
|
Details | Diff | Splinter Review | |
15.13 KB,
patch
|
Details | Diff | Splinter Review | |
6.67 KB,
patch
|
Details | Diff | Splinter Review | |
6.66 KB,
patch
|
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
1.81 KB,
text/plain
|
Details |
we are doing some work to gather compose performance numbers that we can avoid
in the case where the user doesn't have the NSPR_LOG_* environment variables
set (that's the common case).
take a look at nsMsgComposeService.cpp and MsgComposeCommands.js.
start cleaning that timing code up and make it so that we don't incur any cost
in opt builds when the nspr log vars aren't set.
because the timing code lives in the compose service, you are going to need a
new pref. I don't want us to cross the XPconnect boundary if we don't have too.
add a readonly boolean attribute to the compose service. on initialization of
the compose service, get the value for a bool pref
(maybe "mail.logComposePerformance", since we already
have "mail.showMessengerPerformance", add it to mailnews.js defaulting to false)
in, MsgComposeCommands.js, add
var logComposePerformace = msgComposeService.logComposePerformace;
(that will be our minimal cost per compose window.) and use that bool to avoid
doing work in the .js file.
in the C++ file, use mLogComposePerformance to avoid work as well, setting that
in ::Init(), which you will have to add, and you'll have to fix
nsMsgComposeFactory.cpp, too.
if quantify wasn't crashing for you, you'd see a calls to sprintf(), PR_Now(),
other PR_* calls, GetMessageSizeFromURI(), calls across XPConnect even if we
didn't set the env variables.
it's not a huge win, but it gives you something to clean up until we figure out
why quantifying is crashing for you.
once you'll land we'll have to let stephend know and we'll have to update
http://www.mozilla.org/mailnews/performance/msgcompose_loggin.html to include
this new pref.
Reporter | ||
Comment 4•23 years ago
|
||
1) nsresult nsMsgComposeService::GetLogComposePerformance() should be
NS_IMETHODIMP nsMsgComposeService::GetLogComposePerformance()
2) don't define kPrefServiceCID use the contract ID for the pref service.
3) can you also remove "const DEBUG = false;" from MsgComposeCommands.js, if it
isn't needed anymore?
4) in nsMsgComposeService::nsMsgComposeService(), you should default
mLogComposePerformance to PR_FALSE;
5) you need to add some code to wrap the work we are doing in
nsMsgComposeService with "if (mLogComposePerformance) {}". we are still doing
work we don't want to be doing.
Reporter | ||
Comment 5•23 years ago
|
||
for example, we don't want do any of this code if mLogComposePerformance is
false.
#ifdef MSGCOMP_TRACE_PERFORMANCE
// ducarroz, properly fix this in the case of new message (not a reply)
if (type != nsIMsgCompType::NewsPost) {
char buff[256];
sprintf(buff, "Start opening the window, message size = %d", GetMessageS
izeFromURI(originalMsgURI));
TimeStamp(buff, PR_TRUE);
}
#endif
Reporter | ||
Comment 7•23 years ago
|
||
1) + NS_IMETHODIMP Init();
"nsresult Init();" was correct.
2) please do gLogComposePerformance instead of logComposePerformance, that's
the convention we've been using for globals.
other than that, looks good.
Reporter | ||
Comment 10•23 years ago
|
||
Comment on attachment 49038 [details] [diff] [review]
Patch V3 for TimeStamp logging
sr=sspitzer
Attachment #49038 -
Flags: superreview+
Assignee | ||
Comment 11•23 years ago
|
||
Marking Fixed.
Stephen could you update the page to reflect the new pref required to do
timestamp logging.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Partially verified FIXED (on 2 platforms, until I get Linux verified):
When I insert:
user_pref("mailnews.logComposePerformance", true); in prefs.js on both Mac and
Windows on the trunk builds, my normal msgcompose:5 system environment variables
(and for Mac, dragging the text file with the appropriate ARGS:) works fine.
If I switch that to false, or remove that line completely (thereby letting
mailnews.js's value of false taking place), then msgcompose:5 has no effect on
logging any output for message reply speed or window creation time.
Mac OS 9.1 - 2001-09-13-08 TRUNK
Windows 2K - 2001-09-13 (TRUNK CVS pull)
Great, finally verified.
In BASH, doing:
Set NSPR_LOG_MODULES NNTP:5
Set NSPR_LOG_FILE /u/stephend/tmp/log.txt
produced a textfile containing the output, when I had the user_pref specified.
When I re-ran that trunk build (2001-09-13-08) and changed the pref to a value
of false, log.txt was empty.
Status: RESOLVED → VERIFIED
er,...right, set NRPR_LOG_MODULES msgcompose:5 (bad copy and paste)
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•