whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 15fe349: performance improvements
Date Fri, 04 Mar 2016 01:31:23 GMT
Commit 15fe3497d312d2a85ff85eb39545827a1eb1f06d:
    performance improvements


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
lib/whimsy/asf/ldap.rb                                       | +++++++++ ---
www/members/watch.cgi                                        | +++ -
------------------------------------------------------------
16 changes: 12 additions, 4 deletions.
------------------------------------------------------------


diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 8fac25c..6db6398 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -361,15 +361,21 @@ def urls
     end
 
     def committees
-      Committee.list("member=uid=#{name},#{base}")
+      weakref(:committees) do
+        Committee.list("member=uid=#{name},#{base}")
+      end
     end
 
     def groups
-      Group.list("memberUid=#{name}")
+      weakref(:groups) do
+        Group.list("memberUid=#{name}")
+      end
     end
 
     def services
-      Service.list("member=#{dn}")
+      weakref(:services) do
+        Service.list("member=#{dn}")
+      end
     end
 
     def dn
diff --git a/www/members/watch.cgi b/www/members/watch.cgi
index 888989d..062f799 100755
--- a/www/members/watch.cgi
+++ b/www/members/watch.cgi
@@ -72,7 +72,9 @@ _html do
       list = watch_list
     end
 
-    # for efficiency, preload public_names, member status, and nominees
+    # for efficiency, preload committees, public_names, member status, and
+    # nominees
+    committees = ASF::Committee.preload
     people = ASF::Person.preload('cn', list)
     members = ASF::Member.status
     nominees = ASF::Person.member_nominees

Mime
View raw message