You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/03/07 21:54:49 UTC
[whimsy] branch master updated: A bit quicker,
but still somewhat slow
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 <se...@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)]