Please look to Allura/allura/ext/user_profile/templates/user_index.html

          {% for p in user.my_projects() %}                                     
  
        {% if h.has_access(p, 'read')() %}
          <li>      
              <a class="project-name" href="{{p.url()}}">{{p.name}}</a>       
          </li>
        {% endif %}
      {% endfor %}

If user.my_projects() called, is it really necessary to check "if 
h.has_access(p, 'read')()". I have tried to removed this condition and number 
of mongo calls have decreased twice.



---

** [tickets:#6677] User profile's list of projects is slow to build**

**Status:** in-progress
**Labels:** performance 42cc 
**Created:** Thu Sep 19, 2013 08:20 PM UTC by Dave Brondsema
**Last Updated:** Thu Jan 02, 2014 11:07 PM UTC
**Owner:** nobody

With 54 projects, a ridiculous amount of ming & mongo calls are executed on a 
profile page:

~~~~
{
    "url": "/u/brondsem/profile/",
    "uptime": 1820,
    "call_counts": {
        "socket_write": 1,
        "jinja": 1,
        "mongo": 30396,
        "total": 1,
        "socket_read": 14,
        "ming": 1102
    },
    "request_category": "profile",
    "timings": {
        "mongo": 2618,
        "ming": 1328,
        "socket_write": 0,
        "socket_read": 93,
        "total": 4528,
        "jinja": 4478
    }
}
~~~~


---

Sent from sourceforge.net because allura-dev@incubator.apache.org is subscribed 
to https://sourceforge.net/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/allura/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.

Reply via email to