raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / Atom feed
* [PATCH] middleware: minor bytecode size reduction
@ 2016-02-24  1:44 Eric Wong
  0 siblings, 0 replies; 1+ messages in thread
From: Eric Wong @ 2016-02-24  1:44 UTC (permalink / raw)
  To: raindrops-public

The "defineclass" VM instruction takes more operands
and uses more space than "setconstant".  Since we have no
methods or subclasses/constants to define under the
"Raindrops::Middleware::Stats" class,
---
 lib/raindrops/middleware.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/raindrops/middleware.rb b/lib/raindrops/middleware.rb
index bf16924..da2fb9d 100644
--- a/lib/raindrops/middleware.rb
+++ b/lib/raindrops/middleware.rb
@@ -77,8 +77,7 @@ class Raindrops::Middleware
   # and both counters are updated atomically.
   #
   # This is supported on all operating systems supported by Raindrops
-  class Stats < Raindrops::Struct.new(:calling, :writing)
-  end
+  Stats = Raindrops::Struct.new(:calling, :writing)
 
   # :stopdoc:
   require "raindrops/middleware/proxy"
-- 
EW


^ permalink raw reply	[flat|threaded] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-24  1:44 [PATCH] middleware: minor bytecode size reduction Eric Wong

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox