diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-10-28 21:11:54 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-10-29 17:54:31 +0200 |
| commit | 0fd96e62471a4d6c95c5c3a8d6e1de0e59c83379 (patch) | |
| tree | b7b28fe47ae287b418d0af1cbd2ec4fa893edcf6 /indra/newview/llviewerwindow.cpp | |
| parent | 5a0ba25d83862e7d220c1ae62173b537b7db5b52 (diff) | |
#4604 Turn off cef preloading on low end hardware
1. Cef instances are fairly heavy in viewer's implementation, don't preload
them on systems <= 8GB
2. Move initialization into floaters where it belongs.
3. Minimal requirement is 8GB, drop gpu class to 1 on hardware under 8GB
4. Reduce cef instance count on systems under 8GB
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 670a3b2939..5fed98dfe4 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2322,36 +2322,23 @@ void LLViewerWindow::initWorldUI() gToolBarView->setVisible(true); } - if (!gNonInteractive) + // Don't preload cef instances on low end hardware + const F32Gigabytes MIN_PHYSICAL_MEMORY(8); + F32Gigabytes physical_mem = LLMemory::getMaxMemKB(); + if (physical_mem <= 0) { - LLMediaCtrl* destinations = LLFloaterReg::getInstance("destinations")->getChild<LLMediaCtrl>("destination_guide_contents"); - if (destinations) - { - destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - std::string url = gSavedSettings.getString("DestinationGuideURL"); - url = LLWeb::expandURLSubstitutions(url, LLSD()); - destinations->navigateTo(url, HTTP_CONTENT_TEXT_HTML); - } - LLMediaCtrl* avatar_welcome_pack = LLFloaterReg::getInstance("avatar_welcome_pack")->findChild<LLMediaCtrl>("avatar_picker_contents"); - if (avatar_welcome_pack) - { - avatar_welcome_pack->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - std::string url = gSavedSettings.getString("AvatarWelcomePack"); - url = LLWeb::expandURLSubstitutions(url, LLSD()); - avatar_welcome_pack->navigateTo(url, HTTP_CONTENT_TEXT_HTML); - } - LLMediaCtrl* search = LLFloaterReg::getInstance("search")->findChild<LLMediaCtrl>("search_contents"); - if (search) - { - search->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - } - LLMediaCtrl* marketplace = LLFloaterReg::getInstance("marketplace")->getChild<LLMediaCtrl>("marketplace_contents"); - if (marketplace) - { - marketplace->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - std::string url = gSavedSettings.getString("MarketplaceURL"); - marketplace->navigateTo(url, HTTP_CONTENT_TEXT_HTML); - } + LLMemory::updateMemoryInfo(); + physical_mem = LLMemory::getMaxMemKB(); + } + + if (!gNonInteractive && physical_mem > MIN_PHYSICAL_MEMORY) + { + LL_INFOS() << "Preloading cef instances" << LL_ENDL; + + LLFloaterReg::getInstance("destinations"); + LLFloaterReg::getInstance("avatar_welcome_pack"); + LLFloaterReg::getInstance("search"); + LLFloaterReg::getInstance("marketplace"); } } |
