summaryrefslogtreecommitdiffstats
path: root/chrome/common/sandbox_policy.cc
diff options
context:
space:
mode:
authoramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-28 18:44:47 +0000
committeramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-28 18:44:47 +0000
commit2535e637b7da1d6f530bf8f0a6c482c703d2c1f7 (patch)
tree76c41c070e24ca9845f99b2ebf028a1be2152a75 /chrome/common/sandbox_policy.cc
parent684dd5258a8895b5d5af069319ea11ab513cf912 (diff)
downloadchromium_src-2535e637b7da1d6f530bf8f0a6c482c703d2c1f7.zip
chromium_src-2535e637b7da1d6f530bf8f0a6c482c703d2c1f7.tar.gz
chromium_src-2535e637b7da1d6f530bf8f0a6c482c703d2c1f7.tar.bz2
Cold startup performance boost by enabling prefetch hints on Windows
A prefetch file is automatically generated by recording hard page faults during process startup. It's used to speed up the process startup the next time by prefetching those pages. By default, one prefetch file is maintained per exe. Since chrome.exe is launched in different modes (browser, renderer, plugin etc.), we want different prefetch profiles per process type. This is achieved by appending a '/Prefetch:<integer type>' on the command line. This has shown a 20% improvement in cold startup in ChromeFrameStartupTestActiveX.PerfCold on XP, will watch perf dashboards improvements. TEST=none BUG=44129 Review URL: http://codereview.chromium.org/2810033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/sandbox_policy.cc')
-rw-r--r--chrome/common/sandbox_policy.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/common/sandbox_policy.cc b/chrome/common/sandbox_policy.cc
index db38a42..aa5249f 100644
--- a/chrome/common/sandbox_policy.cc
+++ b/chrome/common/sandbox_policy.cc
@@ -430,6 +430,11 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line,
bool child_needs_help =
DebugFlags::ProcessDebugFlags(cmd_line, type, in_sandbox);
+ // Prefetch hints on windows:
+ // Using a different prefetch profile per process type will allow Windows
+ // to create separate pretetch settings for browser, renderer etc.
+ cmd_line->AppendLooseValue(StringPrintf(L"/prefetch:%d", type));
+
if (!in_sandbox) {
base::LaunchApp(*cmd_line, false, false, &process);
return process;