Skip to content

Instantly share code, notes, and snippets.

@rdp
Created November 23, 2019 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdp/316a1d93c2de8eb8292edb53433769cf to your computer and use it in GitHub Desktop.
Save rdp/316a1d93c2de8eb8292edb53433769cf to your computer and use it in GitHub Desktop.
diff --git a/src/http/request.cr b/src/http/request.cr
index f942c33f3..ade289eb1 100644
--- a/src/http/request.cr
+++ b/src/http/request.cr
@@ -110,7 +110,7 @@ class HTTP::Request
request = new line.method, line.resource, headers, body, line.http_version, internal: nil
if io.responds_to?(:remote_address)
- request.remote_address = io.remote_address.try &.to_s
+ #request.remote_address = io.remote_address.try &.to_s
end
return request
diff --git a/src/string/builder.cr b/src/string/builder.cr
index bd6f94b8f..71aa58e1a 100644
--- a/src/string/builder.cr
+++ b/src/string/builder.cr
@@ -106,7 +106,7 @@ class String::Builder < IO
# Try to reclaim some memory if capacity is bigger than what we need
real_bytesize = real_bytesize()
if @capacity > real_bytesize
- resize_to_capacity(real_bytesize)
+ #resize_to_capacity(real_bytesize) # expensive GC!
end
header = @buffer.as({Int32, Int32, Int32}*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment