diff --git a/.hgtags b/.hgtags
index 5206288882801ec17c701fbf233364f76ed1ec2a..199404dbf6196fc69e89ff4b243e94e595cbb534 100644
--- a/.hgtags
+++ b/.hgtags
@@ -73,3 +73,4 @@ b723921b5c711bd24dbe77dc76ef488b544dac78 2.5.0-release
 b723921b5c711bd24dbe77dc76ef488b544dac78 DRTVWR-31_2.5.0-release
 92e58e51776a4f8c29069b1a62ff21454d2085f0 2.6.0-start
 63a6aedfce785a6c760377bf685b2dae616797d2 2.5.1-start
+4dede9ae1ec74d41f6887719f6f1de7340d8578d 2.5.1-release
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 15e3ffe1dafc6952694210606d399889d07e91b0..3838b2b16cee95e5fd878cc6847476807f9298d0 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -29,7 +29,7 @@
 
 const S32 LL_VERSION_MAJOR = 2;
 const S32 LL_VERSION_MINOR = 5;
-const S32 LL_VERSION_PATCH = 2;
+const S32 LL_VERSION_PATCH = 3;
 const S32 LL_VERSION_BUILD = 0;
 
 const char * const LL_CHANNEL = "Second Life Developer";
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 01610f73edb10e7947ede87f1747e739c66361c3..d0c62817e57bc801230f4b45c7017b88602296cd 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8930,7 +8930,7 @@
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
-    <real>0.125</real>
+    <real>2.0</real>
   </map>
   <key>MeshThreadCount</key>
   <map>
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 6c647eb9da0ff6b07a51385ff6cd70431b8b36ae..a9a8e28b00d3d7e36e0471c5fa2350a2554e9005 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -3100,9 +3100,7 @@ F32 LLMeshRepository::getStreamingCost(const LLSD& header, F32 radius)
 	F32 dlowest = llmin(radius/0.06f, 256.f);
 	F32 dlow = llmin(radius/0.24f, 256.f);
 	F32 dmid = llmin(radius/1.0f, 256.f);
-	F32 dhigh = 0.f;
-
-
+	
 	F32 bytes_lowest = header["lowest_lod"]["size"].asReal()/1024.f;
 	F32 bytes_low = header["low_lod"]["size"].asReal()/1024.f;
 	F32 bytes_mid = header["medium_lod"]["size"].asReal()/1024.f;
@@ -3128,14 +3126,35 @@ F32 LLMeshRepository::getStreamingCost(const LLSD& header, F32 radius)
 		bytes_lowest = bytes_low;
 	}
 
-	F32 cost = 0.f;
-	cost += llmax(256.f-dlowest, 1.f)/32.f*bytes_lowest;
-	cost += llmax(dlowest-dlow, 1.f)/32.f*bytes_low;
-	cost += llmax(dlow-dmid, 1.f)/32.f*bytes_mid;
-	cost += llmax(dmid-dhigh, 1.f)/32.f*bytes_high;
+	F32 max_area = 65536.f;
+	F32 min_area = 1.f;
+
+	F32 high_area = llmin(F_PI*dmid*dmid, max_area);
+	F32 mid_area = llmin(F_PI*dlow*dlow, max_area);
+	F32 low_area = llmin(F_PI*dlowest*dlowest, max_area);
+	F32 lowest_area = max_area;
+
+	lowest_area -= low_area;
+	low_area -= mid_area;
+	mid_area -= high_area;
+
+	high_area = llclamp(high_area, min_area, max_area);
+	mid_area = llclamp(mid_area, min_area, max_area);
+	low_area = llclamp(low_area, min_area, max_area);
+	lowest_area = llclamp(lowest_area, min_area, max_area);
+
+	F32 total_area = high_area + mid_area + low_area + lowest_area;
+	high_area /= total_area;
+	mid_area /= total_area;
+	low_area /= total_area;
+	lowest_area /= total_area;
+
+	F32 weighted_avg = bytes_high*high_area +
+					   bytes_mid*mid_area +
+					   bytes_low*low_area +
+					  bytes_lowest*lowest_area;
 
-	cost *= gSavedSettings.getF32("MeshStreamingCostScaler");
-	return cost;
+	return weighted_avg * gSavedSettings.getF32("MeshStreamingCostScaler");
 }
 
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f665f39e9c7bedfdc7516c3fb79c8dd60b4f4408..5d91a0045a1d700e179436bc65616e38a1cb2e1c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -489,6 +489,42 @@ class LLDebugText
 				ypos += y_inc;
 			}
 
+			//show streaming cost/triangle count of known prims in current region OR selection
+			{
+				F32 cost = 0.f;
+				S32 count = 0;
+				const char* label = "Region";
+				if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 0)
+				{ //region
+					LLViewerRegion* region = gAgent.getRegion();
+					if (region)
+					{
+						for (U32 i = 0; i < gObjectList.getNumObjects(); ++i)
+						{
+							LLViewerObject* object = gObjectList.getObject(i);
+							if (object && 
+								object->getRegion() == region &&
+								object->getVolume())
+							{
+								cost += object->getStreamingCost();
+								count += object->getTriangleCount();
+							}
+						}
+					}
+				}
+				else
+				{
+					label = "Selection";
+					cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectStreamingCost();
+					count = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount();
+				}
+					
+				addText(xpos,ypos, llformat("%s streaming cost: %.1f (%.1f KTris)",
+							label, cost, count/1000.f));
+				ypos += y_inc;
+			
+			}
+
 			addText(xpos, ypos, llformat("%d MB Vertex Data", LLVertexBuffer::sAllocatedBytes/(1024*1024)));
 			ypos += y_inc;
 
@@ -572,10 +608,6 @@ class LLDebugText
 				ypos += y_inc;
 			}
 
-			addText(xpos, ypos, llformat("Selection Triangle Count: %.3f Ktris ", LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount()/1000.f));
-
-			ypos += y_inc;
-
 			LLVertexBuffer::sBindCount = LLImageGL::sBindCount = 
 				LLVertexBuffer::sSetCount = LLImageGL::sUniqueCount = 
 				gPipeline.mNumVisibleNodes = LLPipeline::sVisibleLightCount = 0;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 1186d4d8d91d7435ca493c985b1af72f36e6c72d..7f373736fa9e6bdf8902f15c344f7c8e3550bb07 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3096,7 +3096,7 @@ F32 LLVOVolume::getStreamingCost()
 	return 0.f;
 }
 
-U32 LLVOVolume::getTriangleCount() const
+U32 LLVOVolume::getTriangleCount()
 {
 	U32 count = 0;
 	LLVolume* volume = getVolume();
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 0c12f14832fdab693b27292878402115f1623797..b09243055c1ed3d14f6e6f8106c39ee565e896d6 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -131,7 +131,7 @@ class LLVOVolume : public LLViewerObject
 	/*virtual*/	const LLMatrix4	getRenderMatrix() const;
 				U32 	getRenderCost(std::set<LLUUID> &textures) const;
 	/*virtual*/	F32		getStreamingCost();
-	/*virtual*/ U32		getTriangleCount() const;
+	/*virtual*/ U32		getTriangleCount();
 	/*virtual*/ BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end, 
 										  S32 face = -1,                        // which face to check, -1 = ALL_SIDES
 										  BOOL pick_transparent = FALSE,