From b5379b259f56afaee2669d91e0d4aa38265210af Mon Sep 17 00:00:00 2001 From: William Morgan Date: Sun, 26 Apr 2009 10:48:36 -0400 Subject: [PATCH] replace += with << in mbox reading there's a tremendous speed difference between these two operators, though neither of these points are bottlenecks. --- lib/sup/mbox/loader.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb index 7fe9129..fbf31ae 100644 --- a/lib/sup/mbox/loader.rb +++ b/lib/sup/mbox/loader.rb @@ -86,7 +86,7 @@ class Loader < Source @mutex.synchronize do @f.seek offset until @f.eof? || (l = @f.gets) =~ /^\r*$/ - ret += l + ret << l end end ret @@ -94,7 +94,7 @@ class Loader < Source def raw_message offset ret = "" - each_raw_message_line(offset) { |l| ret += l } + each_raw_message_line(offset) { |l| ret << l } ret end -- 2.45.2