Permalink
Commits on Aug 8, 2011
  1. Merge pull request #11 from nahi/build-update

    Build system fixes for recent rubygems
    tmm1 committed Aug 8, 2011
Commits on Aug 7, 2011
  1. Rakefile warning cleanups

    Fix 2 deprecated warnings from recent rake and rubygems such as;
    
      rake/gempackagetask is deprecated.  Use rubygems/package_task instead
      /home/nahi/git/evma_httpserver/Rakefile:24: Use RbConfig instead of obsolete and deprecated Config.
    nahi committed Aug 7, 2011
  2. Make gem buildable with recent rubygems

    cert_chain must not be nil (see following error msg from rubygems/1.8.5)
    
    % rake gem:build
    gem build eventmachine_httpserver.gemspec
    ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
        cert_chain must not be nil
    rake aborted!
    
    I updated *.tmpl file only and kept eventmachine_httpserver.gemspec
    unchanged.
    nahi committed Aug 7, 2011
Commits on Mar 17, 2011
  1. Register HttpServer's RubyHttpConnection object with the garbage coll…

    …ector
    
    Currently, if a class overrides the 'unbind' method, the RubyHttpConnection
    object in each connection object will be leaked.  Similarly, if no one ever
    calls 'unbind' on the HttpServer, the RubyHttpConnection will be leaked on
    garbage collection.  For example, the following program has a memory leak:
    
    """
    require 'rubygems'; require 'eventmachine'; require 'evma_httpserver'
    class MyServer < EM::Connection
      include EM::HttpServer
      def unbind; end
    end
    EM.run do
      EM.start_server '127.0.0.1', 9000, MyServer
    end
    """
    
    As does the following:
    
    """
    require 'rubygems'; require 'eventmachine'; require 'evma_httpserver'
    class MyServer < EM::Connection
      include EM::HttpServer
    end
    10000.times { MyServer.new 1 }
    """
    
    This patch moves destruction of the RubyHttpConnection object from the unbind
    method to the garbage collector.
    
    One may wonder about the performance implications of this patch.  As a rough
    estimate, on my quad-core/16 GB RAM desktop, I ran
      time for i in $(seq 1 10000); do curl localhost:9000; done
    with and without this patch against the following server program:
    
    """
    require 'rubygems'; require 'eventmachine'; require 'evma_httpserver'
    class MyServer < EM::Connection; include EM::HttpServer; end
    EM.run { EM.start_server '0.0.0.0', 9000, MyServer }
    """
    
    Results are shown below.
    
    [Without this patch (8e20269)]
    $ time ( for i in $(seq 1 10000); do curl 127.0.0.1:9000; done >/dev/null 2>/dev/null )
    
    real   0m57.654s
    user   0m2.770s
    sys    0m3.230s
    
    [With this patch]
    $ time ( for i in $(seq 1 10000); do curl 127.0.0.1:9000; done >/dev/null 2>/dev/null )
    
    real   0m55.123s
    user   0m2.550s
    sys    0m3.240s
    gdb committed Mar 17, 2011
Commits on Dec 23, 2010
  1. bump version

    tmm1 committed Dec 23, 2010
  2. Avoid space before Hash#[]

    Signed-off-by: Aman Gupta <aman@tmm1.net>
    alor committed with tmm1 Dec 23, 2010
Commits on Sep 15, 2009
  1. Version bump

    tmm1 committed Sep 15, 2009
  2. Minor cleanup

    tmm1 committed Sep 15, 2009
Commits on Sep 3, 2009
Commits on Aug 1, 2009
  1. Bump gem version

    tmm1 committed Aug 1, 2009
Commits on Jul 6, 2009
Commits on May 7, 2009
Commits on Feb 9, 2009
  1. Add README w/ usage example

    tmm1 committed Feb 9, 2009
Commits on Feb 7, 2009
  1. bump version to 0.1.1

    tmm1 committed Feb 7, 2009
  2. remove obsolete ext/ptch

    tmm1 committed Feb 7, 2009
Commits on Dec 19, 2008
  1. Remove not up to date cvs id lines

    raggi committed Dec 19, 2008
  2. Add generated gemspec

    raggi committed Dec 19, 2008