diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 54b2c19c75d0..89477ba7f4c2 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -3595,6 +3595,13 @@ static void ReadAheadPackagedDll(const wchar_t* dllName, static void PR_CALLBACK ReadAheadDlls_ThreadStart(void* arg) { UniquePtr greDir(static_cast(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