<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,17 @@
 # Most of this list is simply constants frozen for efficiency
+# and lowered memory consumption. Every time Ruby VM comes
+# across a string or a number or a regexp literal,
+# new object is created.
+#
+# This means if you refer to the same string 6 times per request
+# and your application takes 100 requests per second, there are
+# 600 objects for weak MRI garbage collector to work on.
+#
+# GC cycles take up to 80% (!) time of request processing in
+# some cases. Eventually Rubinius and maybe MRI 2.0 gonna
+# improve this situation but at the moment, all commonly used
+# strings, regexp and numbers used as constants so no extra
+# objects created and VM just operate pointers.
 module Merb
     module Const
     
@@ -41,5 +54,10 @@ module Merb
     REQUEST_URI              = &quot;REQUEST_URI&quot;.freeze
     REQUEST_PATH             = &quot;REQUEST_PATH&quot;.freeze
     REMOTE_ADDR              = &quot;REMOTE_ADDR&quot;.freeze
+    BREAK_TAG                = &quot;&lt;br/&gt;&quot;.freeze
+    EMPTY_STRING             = &quot;&quot;.freeze
+    NEWLINE                  = &quot;\n&quot;.freeze
+    DOUBLE_NEWLINE           = &quot;\n\n&quot;.freeze
+    LOCATION                 = &quot;Location&quot;.freeze
   end
 end</diff>
      <filename>lib/merb-core/constants.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,9 +16,9 @@ module Merb
         begin
           rack_response = ::Merb::Dispatcher.handle(Merb::Request.new(env))
         rescue Object =&gt; e
-          return [500, {Merb::Const::CONTENT_TYPE =&gt; &quot;text/html&quot;}, e.message + &quot;&lt;br/&gt;&quot; + e.backtrace.join(&quot;&lt;br/&gt;&quot;)]
+          return [500, {Merb::Const::CONTENT_TYPE =&gt; &quot;text/html&quot;}, e.message + Merb::Const::BREAK_TAG + e.backtrace.join(Merb::Const::BREAK_TAG)]
         end
-        Merb.logger.info &quot;\n\n&quot;
+        Merb.logger.info Merb::Const::DOUBLE_NEWLINE
         Merb.logger.flush
 
         # unless controller.headers[Merb::Const::DATE]
@@ -41,7 +41,7 @@ module Merb
       #
       # @api private
       def deferred?(env)
-        path = env[Merb::Const::PATH_INFO] ? env[Merb::Const::PATH_INFO].chomp('/') : &quot;&quot;
+        path = env[Merb::Const::PATH_INFO] ? env[Merb::Const::PATH_INFO].chomp(Merb::Const::SLASH) : Merb::Const::EMPTY_STRING
         if path =~ Merb.deferred_actions
           Merb.logger.info! &quot;Deferring Request: #{path}&quot;
           true</diff>
      <filename>lib/merb-core/rack/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,10 +24,10 @@ module Merb
         Merb.logger.info(&quot;Dispatcher redirecting to: #{url} (#{status})&quot;)
         Merb.logger.flush
         
-        [status, { &quot;Location&quot; =&gt; url },
+        [status, { Merb::Const::LOCATION =&gt; url },
          Merb::Rack::StreamWrapper.new(&quot;&lt;html&gt;&lt;body&gt;You are being &lt;a href=\&quot;#{url}\&quot;&gt;redirected&lt;/a&gt;.&lt;/body&gt;&lt;/html&gt;&quot;)]
       end
       
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/merb-core/rack/helpers.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>173c4a1889afe4fa355cd768b0c8c66ebbe987f6</id>
    </parent>
  </parents>
  <author>
    <name>Michael S. Klishin</name>
    <email>michael@novemberain.com</email>
  </author>
  <url>http://github.com/wycats/merb-core/commit/afa48c563f5faf06227e1b6b1b73f7638cfe960c</url>
  <id>afa48c563f5faf06227e1b6b1b73f7638cfe960c</id>
  <committed-date>2008-10-12T07:45:54-07:00</committed-date>
  <authored-date>2008-10-12T07:45:11-07:00</authored-date>
  <message>Use frozen constants on the hot path where possible.</message>
  <tree>28f0f4cac058b9c3f610d0b9042c2d3ae786ecc0</tree>
  <committer>
    <name>Michael S. Klishin</name>
    <email>michael@novemberain.com</email>
  </committer>
</commit>
