summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorcallum <none@none>2011-08-17 11:09:00 -0700
committercallum <none@none>2011-08-17 11:09:00 -0700
commitdb92a8cbea78d0481d1349f9e4e49c29010514b2 (patch)
tree23953170ce970d0782502920b80e8b8f494e5478 /indra
parent34b4b3d13968f3ffec53c906198b2abc2145205a (diff)
EXP-700 FIX SLPlugin(s) takes high CPU%
Reviewed by Richard.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llsdserialize_xml.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp
index d8213c4477..bf216d41bf 100644
--- a/indra/llcommon/llsdserialize_xml.cpp
+++ b/indra/llcommon/llsdserialize_xml.cpp
@@ -720,6 +720,7 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name)
case ELEMENT_INTEGER:
{
S32 i;
+ // sscanf okay here with different locales - ints don't change for different locale settings like floats do.
if ( sscanf(mCurrentContent.c_str(), "%d", &i ) == 1 )
{ // See if sscanf works - it's faster
value = i;
@@ -733,15 +734,19 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name)
case ELEMENT_REAL:
{
- F64 r;
- if ( sscanf(mCurrentContent.c_str(), "%lf", &r ) == 1 )
- { // See if sscanf works - it's faster
- value = r;
- }
- else
- {
- value = LLSD(mCurrentContent).asReal();
- }
+ value = LLSD(mCurrentContent).asReal();
+ // removed since this breaks when locale has decimal separator that isn't '.'
+ // investigated changing local to something compatible each time but deemed higher
+ // risk that just using LLSD.asReal() each time.
+ //F64 r;
+ //if ( sscanf(mCurrentContent.c_str(), "%lf", &r ) == 1 )
+ //{ // See if sscanf works - it's faster
+ // value = r;
+ //}
+ //else
+ //{
+ // value = LLSD(mCurrentContent).asReal();
+ //}
}
break;