Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
8feb85e1
Commit
8feb85e1
authored
Feb 10, 2014
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 961789: large dependency trees with lots of resolved bugs are very slow to load
r=LpSolit, a=justdave
parent
256930bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
Bug.pm
Bugzilla/Bug.pm
+15
-8
showdependencytree.cgi
showdependencytree.cgi
+4
-6
No files found.
Bugzilla/Bug.pm
View file @
8feb85e1
...
...
@@ -3800,17 +3800,24 @@ sub editable_bug_fields {
# Join with bug_status and bugs tables to show bugs with open statuses first,
# and then the others
sub
EmitDependList
{
my
(
$myfield
,
$targetfield
,
$bug_id
)
=
(
@_
);
my
(
$my_field
,
$target_field
,
$bug_id
,
$exclude_resolved
)
=
@_
;
my
$cache
=
Bugzilla
->
request_cache
->
{
bug_dependency_list
}
||=
{};
my
$dbh
=
Bugzilla
->
dbh
;
my
$list_ref
=
$dbh
->
selectcol_arrayref
(
"SELECT $targetfield
$exclude_resolved
=
$exclude_resolved
?
1
:
0
;
my
$is_open_clause
=
$exclude_resolved
?
'AND is_open = 1'
:
''
;
$cache
->
{
"${target_field}_sth_$exclude_resolved"
}
||=
$dbh
->
prepare
(
"SELECT $target_field
FROM dependencies
INNER JOIN bugs ON dependencies.$targetfield = bugs.bug_id
INNER JOIN bugs ON dependencies.$target
_
field = bugs.bug_id
INNER JOIN bug_status ON bugs.bug_status = bug_status.value
WHERE $myfield = ?
ORDER BY is_open DESC, $targetfield"
,
undef
,
$bug_id
);
return
$list_ref
;
WHERE $my_field = ? $is_open_clause
ORDER BY is_open DESC, $target_field"
);
return
$dbh
->
selectcol_arrayref
(
$cache
->
{
"${target_field}_sth_$exclude_resolved"
},
undef
,
$bug_id
);
}
# Creates a lot of bug objects in the same order as the input array.
...
...
showdependencytree.cgi
View file @
8feb85e1
...
...
@@ -123,10 +123,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
}
})
{
...
...
@@ -140,7 +138,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
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment