Bug 1640087: Part 1: optimize read ahead DLL prefetches for nightly users r=dthayer

Differential Revision: https://phabricator.services.mozilla.com/D76519
This commit is contained in:
Emma Malysz 2020-05-22 22:50:49 +00:00
Родитель c3c1e322ad
Коммит 473feae63a
1 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -3595,6 +3595,13 @@ static void ReadAheadPackagedDll(const wchar_t* dllName,
static void PR_CALLBACK ReadAheadDlls_ThreadStart(void* arg) {
UniquePtr<wchar_t[]> greDir(static_cast<wchar_t*>(arg));
// In Bug 1628903, we investigated which DLLs we should prefetch in
// order to reduce disk I/O and improve startup on Windows machines.
// Our ultimate goal is to measure the impact of these improvements on
// retention (see Bug 1640087). Before we place this within a pref,
// we should ensure this feature only ships to the nightly channel
// and monitor results from that subset.
# ifdef NIGHTLY_BUILD
// Prefetch the DLLs shipped with firefox
ReadAheadPackagedDll(L"libegl.dll", greDir.get());
ReadAheadPackagedDll(L"libGLESv2.dll", greDir.get());
@ -3605,6 +3612,21 @@ static void PR_CALLBACK ReadAheadDlls_ThreadStart(void* arg) {
// Prefetch the system DLLs
ReadAheadSystemDll(L"DWrite.dll");
ReadAheadSystemDll(L"D3DCompiler_47.dll");
# else
// Load DataExchange.dll and twinapi.appcore.dll for
// nsWindow::EnableDragDrop
ReadAheadSystemDll(L"DataExchange.dll");
ReadAheadSystemDll(L"twinapi.appcore.dll");
// Load twinapi.dll for WindowsUIUtils::UpdateTabletModeState
ReadAheadSystemDll(L"twinapi.dll");
// Load explorerframe.dll for WinTaskbar::Initialize
ReadAheadSystemDll(L"ExplorerFrame.dll");
// Load WinTypes.dll for nsOSHelperAppService::GetApplicationDescription
ReadAheadSystemDll(L"WinTypes.dll");
# endif
}
#endif