From ada4e7ae3dee532868da082ecb93fa92f5a0afed Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 15 Dec 2023 12:03:49 -0500
Subject: [PATCH] Avoid extra copy during GLTF material parse

---
 indra/newview/llgltfmateriallist.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 26980c77cd6..fa1190c4e15 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -333,8 +333,7 @@ namespace
 
 void LLGLTFMaterialList::applyOverrideMessage(LLMessageSystem* msg, const std::string& data_in)
 {
-    std::istringstream str(data_in);
-
+    boost::iostreams::stream<boost::iostreams::array_source> str(data_in.data(), data_in.size());
     LLSD data;
 
     LLSDSerialize::fromNotation(data, str, data_in.length());
-- 
GitLab