allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject [1/2] allura git commit: [#8189] Fix poor perf on forum listings page, due to unintended trip of ming RelationProperty
Date Mon, 26 Feb 2018 14:31:35 GMT
Repository: allura
Updated Branches:
  refs/heads/kt/8189 [created] 202d8a5ca


[#8189] Fix poor perf on forum listings page, due to unintended trip of ming RelationProperty


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/ac2e86a7
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/ac2e86a7
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/ac2e86a7

Branch: refs/heads/kt/8189
Commit: ac2e86a72121435dad666460f561d40a7cba4b8f
Parents: 090e5c3
Author: Kenton Taylor <ktaylor@slashdotmedia.com>
Authored: Mon Feb 26 09:30:33 2018 -0500
Committer: Kenton Taylor <ktaylor@slashdotmedia.com>
Committed: Mon Feb 26 09:30:33 2018 -0500

----------------------------------------------------------------------
 Allura/allura/lib/widgets/discuss.py                     | 2 +-
 Allura/allura/templates/widgets/subscription_form.html   | 2 +-
 ForgeDiscussion/forgediscussion/widgets/forum_widgets.py | 4 +++-
 docker-compose.yml                                       | 1 +
 4 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/ac2e86a7/Allura/allura/lib/widgets/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/discuss.py b/Allura/allura/lib/widgets/discuss.py
index 76035d7..0a7e8b9 100644
--- a/Allura/allura/lib/widgets/discuss.py
+++ b/Allura/allura/lib/widgets/discuss.py
@@ -221,7 +221,7 @@ class SubscriptionForm(ew.SimpleForm):
     class fields(ew_core.NameList):
         page_list = ffw.PageList()
         page_size = ffw.PageSize()
-        threads = _ThreadsTable()
+        _threads = _ThreadsTable()
 
     def resources(self):
         for r in super(SubscriptionForm, self).resources():

http://git-wip-us.apache.org/repos/asf/allura/blob/ac2e86a7/Allura/allura/templates/widgets/subscription_form.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/subscription_form.html b/Allura/allura/templates/widgets/subscription_form.html
index c03f8d2..f86e3b3 100644
--- a/Allura/allura/templates/widgets/subscription_form.html
+++ b/Allura/allura/templates/widgets/subscription_form.html
@@ -24,7 +24,7 @@
     <div class="pagination_size">{{ pager_widget_output }}</div>
   {% endif %}
   <form method="{{method}}" action="{{action}}" {% if enctype %}enctype="{{enctype}}"{%
endif %} class="follow_form">
-    {{widget.fields['threads'].display(value=threads)}}
+    {{widget.fields['_threads'].display(value=threads)}}
     {% if threads and not c.user.is_anonymous() and
             not c.subscribed and not c.tool_subscribed %}
     <p>

http://git-wip-us.apache.org/repos/asf/allura/blob/ac2e86a7/ForgeDiscussion/forgediscussion/widgets/forum_widgets.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/widgets/forum_widgets.py b/ForgeDiscussion/forgediscussion/widgets/forum_widgets.py
index fb063d9..6e98bf3 100644
--- a/ForgeDiscussion/forgediscussion/widgets/forum_widgets.py
+++ b/ForgeDiscussion/forgediscussion/widgets/forum_widgets.py
@@ -48,7 +48,9 @@ class _ThreadsTable(DW._ThreadsTable):
 class ThreadSubscriptionForm(DW.SubscriptionForm):
 
     class fields(ew_core.NameList):
-        threads = _ThreadsTable()
+        # Careful! using the same name as the prop on the model will invoke the RelationalProperty,
+        # causing all related entities to be (re)fetched.
+        _threads = _ThreadsTable()
         page_list = ffw.PageList()
         page_size = ffw.PageSize()
 

http://git-wip-us.apache.org/repos/asf/allura/blob/ac2e86a7/docker-compose.yml
----------------------------------------------------------------------
diff --git a/docker-compose.yml b/docker-compose.yml
index b91a0a0..9741b93 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -27,6 +27,7 @@ services:
     volumes: &volumes
       - .:/allura  # Allura source code from local host
       - /allura-data:/allura-data  # for virtualenv, scm repos, etc
+      - /allura-data/root/home:/root  # for persistent home dir, mainly for pudb
     links:
       - mongo
       - solr


Mime
View raw message