From 928b7cba3ec0eb675a254ff840f398b70e5a8a8c Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 25 Nov 2009 22:00:15 -0800 Subject: Linker optimization, use extern template for LLView::getChild<> --- indra/llui/llview.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 2607120e17..5bf015362d 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -659,4 +659,23 @@ template T* LLView::getChild(const std::string& name, BOOL recurse) co return result; } +// Compiler optimization - don't generate these specializations inline, +// require explicit specialization. See llbutton.cpp for an example. +extern template class LLButton* LLView::getChild( + const std::string& name, BOOL recurse) const; +extern template class LLCheckBoxCtrl* LLView::getChild( + const std::string& name, BOOL recurse) const; +extern template class LLLineEditor* LLView::getChild( + const std::string& name, BOOL recurse) const; +extern template class LLPanel* LLView::getChild( + const std::string& name, BOOL recurse) const; +extern template class LLTextBox* LLView::getChild( + const std::string& name, BOOL recurse) const; +extern template class LLTextEditor* LLView::getChild( + const std::string& name, BOOL recurse) const; +extern template class LLUICtrl* LLView::getChild( + const std::string& name, BOOL recurse) const; +extern template class LLView* LLView::getChild( + const std::string& name, BOOL recurse) const; + #endif //LL_LLVIEW_H -- cgit v1.2.3 From b50ba67bd8ab329d598ce47e5d3ac09b59fffb63 Mon Sep 17 00:00:00 2001 From: James Cook Date: Sun, 29 Nov 2009 10:19:17 -0800 Subject: Revert extern template link optimization until I can build/test on PC --- indra/llui/llview.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 5bf015362d..1b12e78509 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -661,21 +661,21 @@ template T* LLView::getChild(const std::string& name, BOOL recurse) co // Compiler optimization - don't generate these specializations inline, // require explicit specialization. See llbutton.cpp for an example. -extern template class LLButton* LLView::getChild( - const std::string& name, BOOL recurse) const; -extern template class LLCheckBoxCtrl* LLView::getChild( - const std::string& name, BOOL recurse) const; -extern template class LLLineEditor* LLView::getChild( - const std::string& name, BOOL recurse) const; -extern template class LLPanel* LLView::getChild( - const std::string& name, BOOL recurse) const; -extern template class LLTextBox* LLView::getChild( - const std::string& name, BOOL recurse) const; -extern template class LLTextEditor* LLView::getChild( - const std::string& name, BOOL recurse) const; -extern template class LLUICtrl* LLView::getChild( - const std::string& name, BOOL recurse) const; -extern template class LLView* LLView::getChild( - const std::string& name, BOOL recurse) const; +//extern template class LLButton* LLView::getChild( +// const std::string& name, BOOL recurse) const; +//extern template class LLCheckBoxCtrl* LLView::getChild( +// const std::string& name, BOOL recurse) const; +//extern template class LLLineEditor* LLView::getChild( +// const std::string& name, BOOL recurse) const; +//extern template class LLPanel* LLView::getChild( +// const std::string& name, BOOL recurse) const; +//extern template class LLTextBox* LLView::getChild( +// const std::string& name, BOOL recurse) const; +//extern template class LLTextEditor* LLView::getChild( +// const std::string& name, BOOL recurse) const; +//extern template class LLUICtrl* LLView::getChild( +// const std::string& name, BOOL recurse) const; +//extern template class LLView* LLView::getChild( +// const std::string& name, BOOL recurse) const; #endif //LL_LLVIEW_H -- cgit v1.2.3 From 7d3b3cc474822db144b623980d08b7addc2f77ff Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 30 Nov 2009 14:41:52 -0800 Subject: Linker optimization - use "extern template" for commonly regenerated templates Also replaced many duplicate calls to LLViewerCamera::getInstance() with local pointer. Reviewed with Ambroff --- indra/llui/llview.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 1b12e78509..8ee05675c1 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -661,21 +661,9 @@ template T* LLView::getChild(const std::string& name, BOOL recurse) co // Compiler optimization - don't generate these specializations inline, // require explicit specialization. See llbutton.cpp for an example. -//extern template class LLButton* LLView::getChild( -// const std::string& name, BOOL recurse) const; -//extern template class LLCheckBoxCtrl* LLView::getChild( -// const std::string& name, BOOL recurse) const; -//extern template class LLLineEditor* LLView::getChild( -// const std::string& name, BOOL recurse) const; -//extern template class LLPanel* LLView::getChild( -// const std::string& name, BOOL recurse) const; -//extern template class LLTextBox* LLView::getChild( -// const std::string& name, BOOL recurse) const; -//extern template class LLTextEditor* LLView::getChild( -// const std::string& name, BOOL recurse) const; -//extern template class LLUICtrl* LLView::getChild( -// const std::string& name, BOOL recurse) const; -//extern template class LLView* LLView::getChild( -// const std::string& name, BOOL recurse) const; +#ifndef LLVIEW_CPP +extern template class LLView* LLView::getChild( + const std::string& name, BOOL recurse) const; +#endif #endif //LL_LLVIEW_H -- cgit v1.2.3 From 6feb42e0095cfb46c11897d759bdd03033045f54 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 30 Nov 2009 15:45:15 -0800 Subject: De-inlined some UI param block definitions. --- indra/llui/llview.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/llui/llview.h') diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 8ee05675c1..d485244a05 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -111,10 +111,7 @@ public: Alternative string; Alternative flags; - Follows() - : string(""), - flags("flags", FOLLOWS_LEFT | FOLLOWS_TOP) - {} + Follows(); }; struct Params : public LLInitParam::Block -- cgit v1.2.3