Return-Path: X-Original-To: apmail-allura-dev-archive@www.apache.org Delivered-To: apmail-allura-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF3A111EC1 for ; Fri, 8 Aug 2014 11:22:50 +0000 (UTC) Received: (qmail 51640 invoked by uid 500); 8 Aug 2014 11:22:50 -0000 Delivered-To: apmail-allura-dev-archive@allura.apache.org Received: (qmail 51609 invoked by uid 500); 8 Aug 2014 11:22:50 -0000 Mailing-List: contact dev-help@allura.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@allura.apache.org Delivered-To: mailing list dev@allura.apache.org Received: (qmail 51597 invoked by uid 99); 8 Aug 2014 11:22:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Aug 2014 11:22:50 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of noreply@sourceforge.net designates 216.34.181.60 as permitted sender) Received: from [216.34.181.60] (HELO smtp.ch3.sourceforge.com) (216.34.181.60) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Aug 2014 11:22:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.com; s=x; h=Date:References:In-Reply-To:Message-ID:Subject:Reply-To:From:To:MIME-Version:Content-Type; bh=zxKobMJTRuOBzIWHBadn6WiNyrsjWtbkx3lOevcjuOU=; b=erojqsRhWh7u6lE4qEC0QwNIVH7Zic+Nlc9En83M8DJio+eWIfKPPbyOhTGXtE4+ldrhwbW5P8JwmrYzVqCS3GUP1c0bysvWPiyBIu+hIm53aO33rNPWH8rbSXE6j7vwPKAGhbkyBXgWLJkS9YANPQg5s4rV53SEFefuzmnlMVg=; Received: from localhost ([127.0.0.1] helo=sfs-alluradaemon-4.v29.ch3.sourceforge.com) by sfs-alluradaemon-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XFiFc-0002RL-TT for dev@allura.apache.org; Fri, 08 Aug 2014 11:22:24 +0000 Content-Type: multipart/related; boundary="===============5870378827336858985==" MIME-Version: 1.0 To: dev@allura.apache.org From: "Igor Bondarenko" Reply-To: "[allura:tickets] " <7566@tickets.allura.p.re.sf.net> Subject: [allura:tickets] #7566 Milestone admin page can be very slow Message-ID:

In-Reply-To: <53c00f9524b0d97f2fc8ecc0.tickets@allura.p.sourceforge.net> References: <53c00f9524b0d97f2fc8ecc0.tickets@allura.p.sourceforge.net> Date: Fri, 08 Aug 2014 11:22:24 +0000 X-Virus-Checked: Checked by ClamAV on apache.org --===============5870378827336858985== Content-Type: multipart/alternative; boundary="===============5486344993038175436==" MIME-Version: 1.0 --===============5486344993038175436== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit With current approach I see about 40% boost in overall page load on test environment so it's pretty fine now (generated 5000 tickets with a [script](https://sourceforge.net/p/allura/pastebin/53e4b2c2bcf63a4cade1ecf2) to see the difference) At first I had a concern about skipping permissions check for tickets with `acl=[]`, since if there's no acl for a ticket, permission checking logic checks acl in a parent security context (app_config in this example), and I thought there would be problems with this. Experimentally, though, it seems like it doesn't affect milestones page. Second concern is that there's no index on acl, so those queries might be not so fast. So, if we stick with this approach, maybe we should add index on acl and see if it affects those queries. But, I think that removing permissions checks entirely for this method would be great, since we're presenting only counts here, not tickets. Currently it's used only in two places: - milestones edit view (which requires that user has a 'configure' permission, so there's a good chance that user is admin and can see all the tickets anyway) - milestone individual view (e.g. `/p/test/tickets/milestone/2.0/`) - I see 2 counts here (one from pagination widget and a second one from `milestone_count()` and they do not match if you not logged in as admin (both on master and on al/7566) Also, I don't see a problem with those values mismatch, 'cause the `milestone_count()` used to represent the progress, and I believe anyone should be able to see a real counts in milestone progress, even if they don't have permissions to see some of actual tickets. I think we also need Dave's opinion on this :) --- ** [tickets:#7566] Milestone admin page can be very slow** **Status:** code-review **Milestone:** forge-aug-8 **Labels:** performance **Created:** Fri Jul 11, 2014 04:23 PM UTC by Dave Brondsema **Last Updated:** Thu Aug 07, 2014 07:48 AM UTC **Owner:** Alexander Luberg https://sourceforge.net/p/allura/tickets/milestones in particular is getting really slow. I suspect its due to queries for the "Progress" column for every milestone. Perhaps those can be run in a single mongo query somehow, or parallelize with threads. Or just skipped for closed milestones. --- Sent from sourceforge.net because dev@allura.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. --===============5486344993038175436== MIME-Version: 1.0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: 7bit

With current approach I see about 40% boost in overall page load on test environment so it's pretty fine now (generated 5000 tickets with a script to see the difference)

At first I had a concern about skipping permissions check for tickets with acl=[], since if there's no acl for a ticket, permission checking logic checks acl in a parent security context (app_config in this example), and I thought there would be problems with this. Experimentally, though, it seems like it doesn't affect milestones page.

Second concern is that there's no index on acl, so those queries might be not so fast. So, if we stick with this approach, maybe we should add index on acl and see if it affects those queries.

But, I think that removing permissions checks entirely for this method would be great, since we're presenting only counts here, not tickets. Currently it's used only in two places:

  • milestones edit view (which requires that user has a 'configure' permission, so there's a good chance that user is admin and can see all the tickets anyway)
  • milestone individual view (e.g. /p/test/tickets/milestone/2.0/) - I see 2 counts here (one from pagination widget and a second one from milestone_count() and they do not match if you not logged in as admin (both on master and on al/7566)

Also, I don't see a problem with those values mismatch, 'cause the milestone_count() used to represent the progress, and I believe anyone should be able to see a real counts in milestone progress, even if they don't have permissions to see some of actual tickets.

I think we also need Dave's opinion on this :)


[tickets:#7566] Milestone admin page can be very slow

Status: code-review
Milestone: forge-aug-8
Labels: performance
Created: Fri Jul 11, 2014 04:23 PM UTC by Dave Brondsema
Last Updated: Thu Aug 07, 2014 07:48 AM UTC
Owner: Alexander Luberg

https://sourceforge.net/p/allura/tickets/milestones in particular is getting really slow. I suspect its due to queries for the "Progress" column for every milestone. Perhaps those can be run in a single mongo query somehow, or parallelize with threads. Or just skipped for closed milestones.


Sent from sourceforge.net because dev@allura.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.

--===============5486344993038175436==-- --===============5870378827336858985==--