From 2cff1e217ba0df94fc50a30c8d49dc848c294ac6 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Tue, 13 Aug 2024 18:39:57 -0400 Subject: Reduce UI draw stalls from LLSpellChecker singleton via simpleton --- indra/newview/llappviewer.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 262ab439b4..36fe5a953f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -806,6 +806,20 @@ bool LLAppViewer::init() LLUIImageList::getInstance(), ui_audio_callback, deferred_ui_audio_callback); + + if (gSavedSettings.getBOOL("SpellCheck")) + { + std::list dict_list; + std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary"); + boost::split(dict_list, dict_setting, boost::is_any_of(std::string(","))); + if (!dict_list.empty()) + { + LLSpellChecker::setUseSpellCheck(dict_list.front()); + dict_list.pop_front(); + LLSpellChecker::instance().setSecondaryDictionaries(dict_list); + } + } + LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ; // NOW LLUI::getLanguage() should work. gDirUtilp must know the language @@ -1611,7 +1625,7 @@ bool LLAppViewer::doFrame() { LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df gMeshRepo"); - gMeshRepo.update() ; + gMeshRepo.update() ; } if(!total_work_pending) //pause texture fetching threads if nothing to process. @@ -2799,19 +2813,6 @@ bool LLAppViewer::initConfiguration() gSavedSettings.getString("Language")); } - if (gSavedSettings.getBOOL("SpellCheck")) - { - std::list dict_list; - std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary"); - boost::split(dict_list, dict_setting, boost::is_any_of(std::string(","))); - if (!dict_list.empty()) - { - LLSpellChecker::setUseSpellCheck(dict_list.front()); - dict_list.pop_front(); - LLSpellChecker::instance().setSecondaryDictionaries(dict_list); - } - } - if (gNonInteractive) { tempSetControl("AllowMultipleViewers", "true"); -- cgit v1.2.3