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/newview/llbottomtray.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 7640cdcf9d..3db5184f6b 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -47,6 +47,9 @@ class LLSpeakButton; class LLNearbyChatBar; class LLIMChiclet; +// Build time optimization, generate this once in .cpp file +extern template class LLBottomTray* LLSingleton::getInstance(); + class LLBottomTray : public LLSingleton , public LLPanel -- 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/newview/llbottomtray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 3db5184f6b..30f5f88cce 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -48,7 +48,7 @@ class LLNearbyChatBar; class LLIMChiclet; // Build time optimization, generate this once in .cpp file -extern template class LLBottomTray* LLSingleton::getInstance(); +//extern template class LLBottomTray* LLSingleton::getInstance(); class LLBottomTray : public LLSingleton -- 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/newview/llbottomtray.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 30f5f88cce..728a420324 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -47,8 +47,10 @@ class LLSpeakButton; class LLNearbyChatBar; class LLIMChiclet; -// Build time optimization, generate this once in .cpp file -//extern template class LLBottomTray* LLSingleton::getInstance(); +// Build time optimization, generate once in .cpp file +#ifndef LLBOTTOMTRAY_CPP +extern template class LLBottomTray* LLSingleton::getInstance(); +#endif class LLBottomTray : public LLSingleton -- cgit v1.2.3