Closed Bug 98660 Opened 24 years ago Closed 24 years ago

remove unnecessary calls to PR_GetEnv() [starting with PR_GetEnv("PARSE_MODE")]

Categories

(SeaMonkey :: General, defect, P2)

x86
Windows 2000
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla0.9.4

People

(Reporter: sspitzer, Assigned: sspitzer)

Details

(Keywords: perf)

Attachments

(1 file)

even in opt builds, we make calls to PR_GetEnv() here are two that showed up while quantifying message compose: DetermineParseMode() COtherDTD::COtherDTD() the complete list of calls to PR_GetEnv http://lxr.mozilla.org/mozilla/search?string=PR_GetEnv
I slapped a printf into PR_GetEnv() and doing "mozilla -console -P perf about:blank" spit this out: (perf is my profile for perf work) stdout directed to dynamic console stderr directed to dynamic console GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV NSPR_FD_CACHE_SIZE_LOW GETENV NSPR_FD_CACHE_SIZE_HIGH GETENV NSPR_LOG_MODULES GETENV NSPR_LOG_MODULES GETENV MOZILLA_XPTI_STATS GETENV MOZILLA_XPTI_REGLOG GETENV NSPR_LOG_MODULES GETENV PARSE_MODE GETENV ENABLE_STRICT GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE ProfileName : perf GETENV STRRES_ASYNC GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE GETENV PARSE_MODE seems like we could cache the value of PARSE_MODE, no?
Nice find seth!
Status: NEW → ASSIGNED
Keywords: perf
Priority: -- → P2
Target Milestone: --- → mozilla0.9.5
I don't see us getting hit so bad on the 2nd browser window, so maybe it is when we are parsing the XUL the first time? (wild guess) the first time I launch mail I see a bunch of calls (though not as many as the very first window), and much fewer calls on the second time I launch mail. I think it costs us .01 seconds per call, so this could help first browser window time.
Summary: remove unnecessary calls to PR_GetEnv() → remove unnecessary calls to PR_GetEnv() [starting with PR_GetEnv("PARSE_MODE")]
I don't think the result of the PARSE_MODE getenv is used at all. And if you remove it, could you remove it on the branch only, since my patch on bug 55264 should remove it on the trunk any day now.
will do. here comes a branch for the 0.9.4 branch only.
Assignee: waterson → sspitzer
Status: ASSIGNED → NEW
Comment on attachment 48536 [details] [diff] [review] patch sr=sfraser
Attachment #48536 - Flags: superreview+
Comment on attachment 48536 [details] [diff] [review] patch a=blizzard for 0.9.4
Attachment #48536 - Flags: approval+
fixed on 0.9.4 branch (only).
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Target Milestone: mozilla0.9.5 → mozilla0.9.4
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: