# 130 lines of code uses around 20MByte of mem

**URL:** <https://www.ruby-forum.com/t/130-lines-of-code-uses-around-20mbyte-of-mem/126984>\
**Category:** Ruby\
**Created:** [January 23, 2008, 11:23pm UTC](https://www.ruby-forum.com/t/130-lines-of-code-uses-around-20mbyte-of-mem/126984 "2008-01-23T23:23:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![heinrich1208](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ed655f/32.png) [@heinrich1208](https://www.ruby-forum.com/u/heinrich1208)\
**Post date:** [January 23, 2008, 11:23pm UTC](https://www.ruby-forum.com/t/130-lines-of-code-uses-around-20mbyte-of-mem/126984/1 "2008-01-23T23:23:29Z")

</div>

Hi,

anybody an idea which of these requires could use that much memory?

require ‘yaml’  
require ‘net/https’  
require ‘net/http’  
require ‘openssl’  
require ‘csv’  
require ‘date’  
require ‘time’  
require ‘socket’  
include Socket::Constants

bye  
Henry

---

<div class="post-metadata">

**Author:** ![heinrich1208](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ed655f/32.png) [@heinrich1208](https://www.ruby-forum.com/u/heinrich1208)\
**Post date:** [January 23, 2008, 11:38pm UTC](https://www.ruby-forum.com/t/130-lines-of-code-uses-around-20mbyte-of-mem/126984/2 "2008-01-23T23:38:55Z")

</div>

Heinrich P. wrote:

> Hi,
> 
> anybody an idea which of these requires could use that much memory?
> 
> require ‘yaml’  
> require ‘net/https’  
> require ‘net/http’  
> require ‘openssl’  
> require ‘csv’  
> require ‘date’  
> require ‘time’  
> require ‘socket’  
> include Socket::Constants
> 
> bye  
> Henry

irb(main):015:0\> %w{yaml net/https net/http openssl csv date time  
socket}.each do |req|  
irb(main):016:1\* p ‘about to require ’ + req + ’ (press key when ready  
and then check memory)’  
irb(main):017:1\> gets  
irb(main):018:1\> require req  
irb(main):019:1\> end  
“about to require yaml (press key when ready and then check memory)”  
y  
“about to require net/https (press key when ready and then check  
memory)”  
y  
“about to require net/http (press key when ready and then check memory)”  
y  
“about to require openssl (press key when ready and then check memory)”  
y  
“about to require csv (press key when ready and then check memory)”  
y  
“about to require date (press key when ready and then check memory)”  
y  
“about to require time (press key when ready and then check memory)”  
y  
“about to require socket (press key when ready and then check memory)”  
y  
=\> [“yaml”, “net/https”, “net/http”, “openssl”, “csv”, “date”, “time”,  
“socket”]
