diff options
| author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2024-03-05 17:03:11 +0100 |
|---|---|---|
| committer | Guru <alexandrgproductengine@lindenlab.com> | 2024-03-05 19:54:31 +0100 |
| commit | a865d423974ea06dffa47798c81e98e7570b02ec (patch) | |
| tree | d25f6c86d2948f7d8683aaa573d24135c8a26edb /indra/llui/llfloater.cpp | |
| parent | 043a92997f187826ad26ff269613c8f0ed11379f (diff) | |
viewer#819 Avoid reading the same XML file multiple times
Diffstat (limited to 'indra/llui/llfloater.cpp')
| -rw-r--r-- | indra/llui/llfloater.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 3a6ee50a68..87ab9d0b19 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -3419,12 +3419,16 @@ bool LLFloater::isVisible(const LLFloater* floater) return floater && floater->getVisible(); } -bool LLFloater::buildFromFile(const std::string& filename) +bool LLFloater::buildFromFile(const std::string& filename, bool cacheable) { LL_PROFILE_ZONE_SCOPED; + + llassert_msg(!cacheable || !mSingleInstance || !mReuseInstance, + "No needs to cache XML for floater with mSingleInstance AND mReuseInstance flags set"); + LLXMLNodePtr root; - if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) + if (!LLUICtrlFactory::getLayeredXMLNode(filename, root, LLDir::CURRENT_SKIN, cacheable)) { LL_WARNS() << "Couldn't find (or parse) floater from: " << filename << LL_ENDL; return false; |
