whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: A bit quicker, but still somewhat slow
Date Thu, 07 Mar 2019 21:54:49 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 0e582af  A bit quicker, but still somewhat slow
0e582af is described below

commit 0e582af343cab92557560e307cdfa17f8d60a777
Author: Sebb <sebb@apache.org>
AuthorDate: Thu Mar 7 21:54:48 2019 +0000

    A bit quicker, but still somewhat slow
---
 lib/whimsy/asf/mlist.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb
index 3b1c664..f9f7ac6 100644
--- a/lib/whimsy/asf/mlist.rb
+++ b/lib/whimsy/asf/mlist.rb
@@ -259,7 +259,8 @@ module ASF
           dom = match[1].downcase # just in case
           list = match[2].downcase # just in case
           # Keep original case of email addresses
-          yield dom, list, stanza.scan(/^(.*@.*)/).flatten
+          # TODO: a bit slow for subs file, implement cache of parsed file?
+          yield dom, list, stanza.split(/\n/).select{|x| x =~ /@/}
         else
           # don't allow mismatches as that means the RE is wrong
           line=stanza[0..(stanza.index("\n")|| -1)]


Mime
View raw message