summaryrefslogtreecommitdiff
path: root/indra/newview/llnamelistctrl.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-07-27 15:18:29 -0700
committerRichard Linden <none@none>2012-07-27 15:18:29 -0700
commitfd7bfb03c946b0190bf0965e19b1b679eac3c383 (patch)
tree08eeaa4d3eee2845323ea25af675adf05badb6ef /indra/newview/llnamelistctrl.h
parent55a7bdf8d3f59b0d1973d1ec22d3c8770a077723 (diff)
MAINT-1175 FIX Severe performance issues on 3.3.2 (258114) Release and 3.3.3 (259197) Beta in "Add scroll list item"
removed linear scan for namelist items and used weak reference (LLHandle) instead
Diffstat (limited to 'indra/newview/llnamelistctrl.h')
-rw-r--r--indra/newview/llnamelistctrl.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index ca9956dc53..ffacd69db4 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -33,6 +33,26 @@
class LLAvatarName;
+/**
+ * LLNameListCtrl item
+ *
+ * We don't use LLScrollListItem to be able to override getUUID(), which is needed
+ * because the name list item value is not simply an UUID but a map (uuid, is_group).
+ */
+class LLNameListItem : public LLScrollListItem, public LLHandleProvider<LLNameListItem>
+{
+public:
+ LLUUID getUUID() const { return getValue()["uuid"].asUUID(); }
+protected:
+ friend class LLNameListCtrl;
+
+ LLNameListItem( const LLScrollListItem::Params& p )
+ : LLScrollListItem(p)
+ {
+ }
+};
+
+
class LLNameListCtrl
: public LLScrollListCtrl, public LLInstanceTracker<LLNameListCtrl>
{
@@ -115,7 +135,7 @@ public:
/*virtual*/ void mouseOverHighlightNthItem( S32 index );
private:
void showInspector(const LLUUID& avatar_id, bool is_group);
- void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
+ void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, LLHandle<LLNameListItem> item);
private:
S32 mNameColumnIndex;
@@ -124,24 +144,5 @@ private:
bool mShortNames; // display name only, no SLID
};
-/**
- * LLNameListCtrl item
- *
- * We don't use LLScrollListItem to be able to override getUUID(), which is needed
- * because the name list item value is not simply an UUID but a map (uuid, is_group).
- */
-class LLNameListItem : public LLScrollListItem
-{
-public:
- LLUUID getUUID() const { return getValue()["uuid"].asUUID(); }
-
-protected:
- friend class LLNameListCtrl;
-
- LLNameListItem( const LLScrollListItem::Params& p )
- : LLScrollListItem(p)
- {
- }
-};
#endif