]> git.cworth.org Git - sup/commitdiff
maildir cpu usage regression fix
authorBen Walton <bwalton@artsci.utoronto.ca>
Wed, 4 Jun 2008 00:17:01 +0000 (20:17 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Thu, 31 Jul 2008 00:46:56 +0000 (17:46 -0700)
This small tweak resolves the cpu usage issue pointed out by Grant Hollingworth
on sup-talk (http://rubyforge.org/pipermail/sup-talk/2008-May/001539.html).

lib/sup/maildir.rb

index 74a3e02554c7eed68ce29de41c71e1417b669fed..3d584f76d6054d2c5ffaa10954ea752ed98c808c 100644 (file)
@@ -109,9 +109,6 @@ class Maildir < Source
        end
       end
       @ids = @dir_ids.values.flatten.uniq.sort!
-      #remove old id to fn mappings...hopefully this doesn't actually change
-      #anything...normally, we'll add to this list but never remove mail.
-      @ids_to_fns.delete_if { |k, v| !@ids.include?(k) }
     rescue SystemCallError, IOError => e
       raise FatalSourceError, "Problem scanning Maildir directories: #{e.message}."
     end