diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index aec36ef2c4f11a4767865ce81955a6d94f5b94c3..d62fabe3df763371487ee84f612d3801e66e18d3 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -130,7 +130,6 @@ TimeBlockTreeNode* ThreadRecorder::getTimeBlockTreeNode( S32 index )
 	return NULL;
 }
 
-
 AccumulatorBufferGroup* ThreadRecorder::activate( AccumulatorBufferGroup* recording)
 {
 	ActiveRecording* active_recording = new ActiveRecording(recording);
@@ -215,8 +214,7 @@ void ThreadRecorder::deactivate( AccumulatorBufferGroup* recording )
 
 ThreadRecorder::ActiveRecording::ActiveRecording( AccumulatorBufferGroup* target ) 
 :	mTargetRecording(target)
-{
-}
+{}
 
 void ThreadRecorder::ActiveRecording::movePartialToTarget()
 {
@@ -238,21 +236,7 @@ void ThreadRecorder::addChildRecorder( class ThreadRecorder* child )
 void ThreadRecorder::removeChildRecorder( class ThreadRecorder* child )
 {	
 	{ LLMutexLock lock(&mChildListMutex);
-		for (child_thread_recorder_list_t::iterator it = mChildThreadRecorders.begin(), end_it = mChildThreadRecorders.end();
-			it != end_it;
-			++it)
-		{
-			if ((*it) == child)
-			{
-				// FIXME: this won't do any good, as the child stores the "pushed" values internally
-				// and it is in the process of being deleted.
-				// We need a way to finalize the stats from the outgoing thread, but the storage
-				// for those stats needs to be outside the child's thread recorder
-				//(*it)->pushToParent();
-				mChildThreadRecorders.erase(it);
-				break;
-			}
-		}
+		mChildThreadRecorders.remove(child);
 	}
 }
 
@@ -316,5 +300,4 @@ void set_thread_recorder( ThreadRecorder* recorder )
 	get_thread_recorder_ptr() = recorder;
 }
 
-
 }
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index aef632e91329cdee865c8fb1db33a94e6c11eac1..88f3c7d6f9726e2ddab6c52b82e72b26faf90574 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -1440,11 +1440,8 @@ S32 LLViewerOctreeCull::AABBRegionSphereIntersectObjectExtents(const LLViewerOct
 //------------------------------------------
 //check if the objects projection large enough
 
-static LLTrace::BlockTimerStatHandle sProjectedAreaCheckTimeStat("Object projected area check", "Culling objects based on projected area");
-
 bool LLViewerOctreeCull::checkProjectionArea(const LLVector4a& center, const LLVector4a& size, const LLVector3& shift, F32 pixel_threshold, F32 near_radius)
 {	
-	LL_RECORD_BLOCK_TIME(sProjectedAreaCheckTimeStat);
 	LLVector3 local_orig = mCamera->getOrigin() - shift;
 	LLVector4a origin;
 	origin.load3(local_orig.mV);
@@ -1462,7 +1459,7 @@ bool LLViewerOctreeCull::checkProjectionArea(const LLVector4a& center, const LLV
 	distance -= near_radius;
 
 	F32 squared_rad = size.dot3(size).getF32();
-	return squared_rad / (distance * distance) > pixel_threshold;
+	return squared_rad / distance > pixel_threshold;
 }
 
 //virtual 
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 956f9a2667d62d68ecaf119c744b7ae445e23f7a..515cc003c08026dd021afe26edd80cff1d479b49 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -433,11 +433,8 @@ bool LLVOCacheEntry::isAnyVisible(const LLVector4a& camera_origin, const LLVecto
 	return vis;
 }
 
-static LLTrace::BlockTimerStatHandle sSceneContributionCalc("Calculate scene contribution", "Calculates relative importance of object to scene, to control object load from cache");
-
-void LLVOCacheEntry::calcSceneContribution(const LLVector4a& camera_origin, bool needs_update, U32 last_update, F32 dist_threshold)
+void LLVOCacheEntry::calcSceneContribution(const LLVector4a& camera_origin, bool needs_update, U32 last_update, F32 max_dist)
 {
-	LL_RECORD_BLOCK_TIME(sSceneContributionCalc);
 	if(!needs_update && getVisible() >= last_update)
 	{
 		return; //no need to update
@@ -446,8 +443,9 @@ void LLVOCacheEntry::calcSceneContribution(const LLVector4a& camera_origin, bool
 	LLVector4a lookAt;
 	lookAt.setSub(getPositionGroup(), camera_origin);
 	F32 distance = lookAt.getLength3().getF32();
+	distance -= sNearRadius;
 
-	if(distance <= sNearRadius)
+	if(distance <= 0.f)
 	{
 		//nearby objects, set a large number
 		const F32 LARGE_SCENE_CONTRIBUTION = 1000.f; //a large number to force to load the object.
@@ -455,14 +453,12 @@ void LLVOCacheEntry::calcSceneContribution(const LLVector4a& camera_origin, bool
 	}
 	else
 	{
-		distance -= sNearRadius;
-
 		F32 rad = getBinRadius();
-		dist_threshold += rad;
+		max_dist += rad;
 
-		if(distance < dist_threshold)
+		if(distance + sNearRadius < max_dist)
 		{
-			mSceneContrib = (rad * rad) / (distance * distance);		
+			mSceneContrib = (rad * rad) / distance;		
 		}
 		else
 		{
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index 80268d4e9cceea94df124ed20247d408123a9076..c32b4f8984f259aa132178667f5081b576821445 100755
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -158,11 +158,11 @@ class LLVOCacheEntry
 	F32                         mBSphereRadius; //bounding sphere radius
 
 public:
-	static U32  sMinFrameRange;
-	static F32  sNearRadius;
-	static F32  sRearFarRadius;
-	static F32  sFrontPixelThreshold;
-	static F32  sRearPixelThreshold;
+	static U32					sMinFrameRange;
+	static F32					sNearRadius;
+	static F32					sRearFarRadius;
+	static F32					sFrontPixelThreshold;
+	static F32					sRearPixelThreshold;
 };
 
 class LLVOCacheGroup : public LLOcclusionCullingGroup