summaryrefslogtreecommitdiffstats
path: root/showdependencytree.cgi
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2014-02-10 09:07:55 +0100
committerByron Jones <bjones@mozilla.com>2014-02-10 09:07:55 +0100
commite551a3c17b2207324761b91e02f03c7f84fbc6ea (patch)
tree2736e15969342698a7feb5dc4346227261992afa /showdependencytree.cgi
parent240db1a527f880948ab1d17f915e55c986ffc716 (diff)
downloadbugzilla-e551a3c17b2207324761b91e02f03c7f84fbc6ea.tar.gz
bugzilla-e551a3c17b2207324761b91e02f03c7f84fbc6ea.tar.xz
Bug 961789: large dependency trees with lots of resolved bugs are very slow to load
Diffstat (limited to 'showdependencytree.cgi')
-rwxr-xr-xshowdependencytree.cgi10
1 files changed, 4 insertions, 6 deletions
diff --git a/showdependencytree.cgi b/showdependencytree.cgi
index 6aab63880..b50b38ce2 100755
--- a/showdependencytree.cgi
+++ b/showdependencytree.cgi
@@ -141,10 +141,8 @@ sub _generate_tree {
_generate_tree($dep_id, $relationship, $depth + 1, $bugs, $ids);
}
- # remove bugs according to visiblity and filters
- if (!Bugzilla->user->can_see_bug($dep_id)
- || ($hide_resolved && !$bugs->{$dep_id}->isopened))
- {
+ # remove bugs according to visiblity
+ if (!Bugzilla->user->can_see_bug($dep_id)) {
delete $ids->{$dep_id};
}
elsif (!grep { $_ == $dep_id } @{ $bugs->{dependencies}->{$bug_id} }) {
@@ -158,7 +156,7 @@ sub _get_dependencies {
my $cache = Bugzilla->request_cache->{dependency_cache} ||= {};
return $cache->{$bug_id}->{$relationship} ||=
$relationship eq 'dependson'
- ? Bugzilla::Bug::EmitDependList('blocked', 'dependson', $bug_id)
- : Bugzilla::Bug::EmitDependList('dependson', 'blocked', $bug_id);
+ ? Bugzilla::Bug::EmitDependList('blocked', 'dependson', $bug_id, $hide_resolved)
+ : Bugzilla::Bug::EmitDependList('dependson', 'blocked', $bug_id, $hide_resolved);
}