From ce18034e6544364e39aef0ac1a315b7e9e5770fa Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 8 Dec 2009 18:17:32 -0800 Subject: Performance improvements for the nearby media floater when lots of media is present. Added LLViewerMediaImpl::mInNearbyMediaList for LLFloaterNearbyMedia::refreshList() to use to keep track of which elements it's seen -- this allows us to remove a linear search in an inner loop. Added a map from texture ID to media impl pointer in LLViewerMedia/LLViewerMediaImpl. This allows LLViewerMedia::getMediaImplFromTextureID() to be a std::map lookup instead of a linear search. In LLFloaterNearbyMedia, call sortByColumnIndex in postBuild instead of in addMediaItem(). The latter was causing some unnecessary re-sorting. Hf: Enter commit message. Lines beginning with 'HG:' are removed. --- indra/newview/llviewermedia.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llviewermedia.h') diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 713eb2710b..349a66867a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -79,6 +79,8 @@ class LLViewerMedia typedef std::vector impl_list; + typedef std::map impl_id_map; + // Special case early init for just web browser component // so we can show login screen. See .cpp file for details. JC @@ -287,6 +289,8 @@ public: LLPluginClassMedia::EPriority getPriority() { return mPriority; }; void setLowPrioritySizeLimit(int size); + + void setTextureID(LLUUID id = LLUUID::null); typedef enum { @@ -348,6 +352,7 @@ public: LLMimeDiscoveryResponder *mMimeTypeProbe; bool mMediaAutoPlay; std::string mMediaEntryURL; + bool mInNearbyMediaList; // used by LLFloaterNearbyMedia::refreshList() for performance reasons private: BOOL mIsUpdated ; -- cgit v1.2.3