From 053d97db1b283ca2548dc1f64756ddfc5166158f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 25 Sep 2013 19:12:35 -0700 Subject: better memory usage for LLTrace (tighter packing of recording arrays) removed complicated and unnecessary fast timer gapless handoff logic (it should be gapless anyway) improved MemTrackable API, better separation of shadow and footprint added memory usage stats to floater_stats.xml --- indra/llui/llviewmodel.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'indra/llui/llviewmodel.cpp') diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp index 21c4e0fcac..6459ade027 100755 --- a/indra/llui/llviewmodel.cpp +++ b/indra/llui/llviewmodel.cpp @@ -35,8 +35,6 @@ // external library headers // other Linden headers -//LLTrace::MemStatHandle LLViewModel::sMemStat("LLViewModel"); - /// LLViewModel::LLViewModel() : mDirty(false) @@ -83,11 +81,11 @@ void LLTextViewModel::setValue(const LLSD& value) { LLViewModel::setValue(value); // approximate LLSD storage usage - memDisclaim(mDisplay.size()); - memDisclaim(mDisplay); + disclaimMem(mDisplay.size()); + disclaimMem(mDisplay); mDisplay = utf8str_to_wstring(value.asString()); - memClaim(mDisplay); - memClaim(mDisplay.size()); + claimMem(mDisplay); + claimMem(mDisplay.size()); // mDisplay and mValue agree mUpdateFromDisplay = false; @@ -99,11 +97,11 @@ void LLTextViewModel::setDisplay(const LLWString& value) // and do the utf8str_to_wstring() to get the corresponding mDisplay // value. But a text editor might want to edit the display string // directly, then convert back to UTF8 on commit. - memDisclaim(mDisplay.size()); - memDisclaim(mDisplay); + disclaimMem(mDisplay.size()); + disclaimMem(mDisplay); mDisplay = value; - memClaim(mDisplay); - memClaim(mDisplay.size()); + claimMem(mDisplay); + claimMem(mDisplay.size()); mDirty = true; // Don't immediately convert to UTF8 -- do it lazily -- we expect many // more setDisplay() calls than getValue() calls. Just flag that it needs -- cgit v1.2.3