summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2011-08-10 10:52:56 -0700
committerRichard Nelson <richard@lindenlab.com>2011-08-10 10:52:56 -0700
commit11005a9d917dde208fc0917bb84701d09e1a395e (patch)
tree376dfff5540203d1353c9bdc8c3823019dca3dd0 /indra
parentf5886bfaff0385acf0a55bc1b8678330ae89442a (diff)
added fast timers to profile inventory LLSD deserialization
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llsdserialize.cpp2
-rw-r--r--indra/llcommon/llsdserialize_xml.cpp12
-rw-r--r--indra/llinventory/llinventory.cpp3
-rw-r--r--indra/newview/llfolderview.cpp2
4 files changed, 15 insertions, 4 deletions
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index bf62600514..6610daa1e0 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -313,8 +313,10 @@ LLSDParser::LLSDParser()
LLSDParser::~LLSDParser()
{ }
+LLFastTimer::DeclareTimer FTM_SD_PARSE("LLSD Parsing");
S32 LLSDParser::parse(std::istream& istr, LLSD& data, S32 max_bytes)
{
+ LLFastTimer _(FTM_SD_PARSE);
mCheckLimits = (LLSDSerialize::SIZE_UNLIMITED == max_bytes) ? false : true;
mMaxBytesLeft = max_bytes;
return doParse(istr, data);
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp
index c5a7c6fc15..d8213c4477 100644
--- a/indra/llcommon/llsdserialize_xml.cpp
+++ b/indra/llcommon/llsdserialize_xml.cpp
@@ -354,6 +354,7 @@ static unsigned get_till_eol(std::istream& input, char *buf, unsigned bufsize)
return count;
}
+LLFastTimer::DeclareTimer FTM_SD_PARSE_READ_STREAM("LLSD Read Stream");
S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
{
XML_Status status;
@@ -373,10 +374,13 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
{
break;
}
- count = get_till_eol(input, (char *)buffer, BUFFER_SIZE);
- if (!count)
- {
- break;
+ { LLFastTimer _(FTM_SD_PARSE_READ_STREAM);
+
+ count = get_till_eol(input, (char *)buffer, BUFFER_SIZE);
+ if (!count)
+ {
+ break;
+ }
}
status = XML_ParseBuffer(mParser, count, false);
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index a3caf79519..76760aa414 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1034,8 +1034,11 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
}
+LLFastTimer::DeclareTimer FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize");
+
bool LLInventoryItem::fromLLSD(const LLSD& sd)
{
+ LLFastTimer _(FTM_INVENTORY_SD_DESERIALIZE);
mInventoryType = LLInventoryType::IT_NONE;
mAssetUUID.setNull();
std::string w;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 02be477e0d..f471caa65c 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -2040,8 +2040,10 @@ void LLFolderView::removeItemID(const LLUUID& id)
mItemMap.erase(id);
}
+LLFastTimer::DeclareTimer FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID");
LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
{
+ LLFastTimer _(FTM_GET_ITEM_BY_ID);
if (id == getListener()->getUUID())
{
return this;