added fast timers to profile inventory LLSD deserialization

master
Richard Nelson 2011-08-10 10:52:56 -07:00
parent f5886bfaff
commit 11005a9d91
4 changed files with 15 additions and 4 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;