#6677 User profile's list of projects is slow to build

v1.2.0
closed
General
2015-08-20
2013-09-19
No

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
    }
}

Discussion

<< < 1 2 (Page 2 of 2)
  • Cory Johns - 2014-02-12
    • QA: Cory Johns
     
  • Cory Johns - 2014-02-12
    • status: code-review --> closed
    • Milestone: forge-backlog --> forge-feb-21
     
  • Cory Johns - 2014-02-12

    Great

     
  • Dave Brondsema

    Dave Brondsema - 2014-02-12
    • status: closed --> open
     
  • Dave Brondsema

    Dave Brondsema - 2014-02-12

    This should be limited to named ALLOW roles. As-is there are a variety of other projects showing up when they shouldn't be.

     
  • Cory Johns - 2014-02-12

    The problem isn't ALLOW vs DENY (the has_access('read') check was added back to cover that) but the fact that most projects are open readable and we have a ton of auto-generated ProjectRoles associating users to projects that they simply viewed once, even if they're not assigned to any groups.

    We need to confirm that the user is actually assigned to some (named) group. In theory, the user's ProjectRole itself could be used directly in the ACL, but AFAIK that's only done when blocking a user (which isn't relevant to projects and would be handled by the has_access check anyway). I think just checking if the user roles cache item has any entries may be enough, but worst-case we just have to pull all the ProjectRoles referenced in the user roles' roles lists (not quite as bad as the entire reaching roles set, and we could do it as a single query against ProjectRole like is now done for the Project query) and check the name on each (to ensure it's neither anon nor auth).

    Have I mentioned that I dislike our permissions system?

     
  • Cory Johns - 2014-02-12
    • status: open --> in-progress
    • assigned_to: Cory Johns
    • QA: Cory Johns --> nobody
     
  • Cory Johns - 2014-02-12
    • status: in-progress --> code-review
     
  • Cory Johns - 2014-02-12

    allura:cj/6677

     
  • Dave Brondsema

    Dave Brondsema - 2014-02-13
    • QA: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2014-02-13
    • status: code-review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2015-01-05
    • Milestone: unreleased --> asf_release_1.2.0
     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.