[ARVADOS] updated: 363cf3922027bee3f04c89eff624e7e5506f6822

git at public.curoverse.com git at public.curoverse.com
Sat Jun 6 22:46:17 EDT 2015


Summary of changes:
 sdk/ruby/lib/arvados/keep.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

       via  363cf3922027bee3f04c89eff624e7e5506f6822 (commit)
      from  f5ba3202d1b0065ab8c28f553972f180fbb56238 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 363cf3922027bee3f04c89eff624e7e5506f6822
Author: radhika <radhika at curoverse.com>
Date:   Sat Jun 6 22:45:36 2015 -0400

    6203: further performance improvement by replacing Hash usage with Set.

diff --git a/sdk/ruby/lib/arvados/keep.rb b/sdk/ruby/lib/arvados/keep.rb
index 13492a9..7500b30 100644
--- a/sdk/ruby/lib/arvados/keep.rb
+++ b/sdk/ruby/lib/arvados/keep.rb
@@ -207,12 +207,12 @@ module Keep
       @text.split("\n").each do |line|
         words = line.split
         stream = words[0]
-        files[stream] = {}
+        files[stream] ||= Set.new
         words.each do |word|
           match = FILE_REGEXP.match word
           if match
-            if !files[stream][match[5]]
-              files[stream][match[5]] = true
+            if !files[stream].include? [match[5]]
+              files[stream].add [match[5]]
               count_so_far += 1
             end
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list