From f280c43d616d013747a9aab05141635868e00136 Mon Sep 17 00:00:00 2001 From: James Cook Date: Sat, 28 Nov 2009 16:51:02 -0800 Subject: Use extern template for common singletons to reduce code bloat/link time. --- indra/llui/lluictrlfactory.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llui/lluictrlfactory.cpp') diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 1c1450d7e9..49182be328 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -75,6 +75,9 @@ public: static LLDefaultChildRegistry::Register r1("locate"); +// Build time optimization, generate this once in .cpp file +template class LLUICtrlFactory* LLSingleton::getInstance(); + //----------------------------------------------------------------------------- // LLUICtrlFactory() //----------------------------------------------------------------------------- -- 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/lluictrlfactory.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/lluictrlfactory.cpp') diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 49182be328..3643bf44f7 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -32,6 +32,7 @@ #include "linden_common.h" +#define LLUICTRLFACTORY_CPP #include "lluictrlfactory.h" #include "llxmlnode.h" -- cgit v1.2.3