The default bug view has changed. See this FAQ.

large dependency trees are very slow to load

RESOLVED FIXED in Bugzilla 4.4

Status

()

Bugzilla
Dependency Views
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

({perf})

unspecified
Bugzilla 4.4
Bug Flags:
approval +
approval4.4 +

Details

(URL)

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

4 years ago
the dependency tree on bug 841999 is slow to the point of being useless (just took 45 seconds to load).

i suspect we can do better.
(Assignee)

Comment 1

4 years ago
Created attachment 806146 [details] [diff] [review]
917370_1.patch

there were two major problems with the old code performance-wise:
- it always generated bugs for the complete tree, regardless of max-depth
- it created bug objects one-by-one instead of using new_from_list

this patch greatly improves performance for bugs with deep dependency trees.
Attachment #806146 - Flags: review?(dkl)

Comment 2

4 years ago
Comment on attachment 806146 [details] [diff] [review]
917370_1.patch

>-local our $hide_resolved = $cgi->param('hide_resolved') ? 1 : 0;
>-
>-local our $maxdepth = $cgi->param('maxdepth') || 0;
>-if ($maxdepth !~ /^\d+$/) { $maxdepth = 0 };
>+my $hide_resolved = $cgi->param('hide_resolved') ? 1 : 0;
>+my $maxdepth = $cgi->param('maxdepth') || 0;

You cannot use "my" and then use these variables inside subroutines (unless you pass them as parameters), see bug 348923.
Attachment #806146 - Flags: review?(dkl) → review-
(Assignee)

Comment 3

4 years ago
Created attachment 806429 [details] [diff] [review]
917370_2.patch

oops, thanks for catching that lpsolit.  that script is in need of a rewrite, but not today.
Attachment #806146 - Attachment is obsolete: true
Attachment #806429 - Flags: review?(dkl)
Comment on attachment 806429 [details] [diff] [review]
917370_2.patch

Review of attachment 806429 [details] [diff] [review]:
-----------------------------------------------------------------

I am getting a lot of duplicates lines within the same block when going above depth of 5 or so. On your bmo/4.2 devel system, place the patched showdependencytree.cgi from trunk over the bmo copy.
Then view showdependencytree.cgi?id=841999&hide_resolved=1 and you will see what I mean. I will also attach a screenshot. dkl
Attachment #806429 - Flags: review?(dkl) → review-
Created attachment 811388 [details]
screen shot showing duplicate dependencies for one bug
(Assignee)

Comment 6

4 years ago
Created attachment 812476 [details] [diff] [review]
917370_3.patch
Attachment #806429 - Attachment is obsolete: true
Attachment #811388 - Attachment is obsolete: true
Attachment #812476 - Flags: review?(dkl)
Comment on attachment 812476 [details] [diff] [review]
917370_3.patch

Review of attachment 812476 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl with fix on checkin.

::: showdependencytree.cgi
@@ +136,5 @@
>  }
> +
> +sub _get_dependencies {
> +    my ($bug_id, $relationship) = @_;
> +    my $cache = Bugzilla->request_cache->{dependency_cache};

Change the above line to:

my $cache = Bugzilla->request_cache->{dependency_cache} ||= {};

Otherwise, it would time out and the page never loaded for me.
Attachment #812476 - Flags: review?(dkl) → review+

Updated

4 years ago
Flags: approval?
Flags: approval4.4?

Updated

4 years ago
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+

Comment 8

4 years ago
Should be committed asap (with the fix on checkin) as we plan to release on Tuesday.
Keywords: perf
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → Bugzilla 4.4
(Assignee)

Comment 9

4 years ago
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/4.4/
modified showdependencytree.cgi
Committed revision 8619.

Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/trunk/
modified showdependencytree.cgi
Committed revision 8773.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED

Comment 10

4 years ago
AWESOME!!!  This is so much better now. Thank you all for your quick attention and for the great fix!
You need to log in before you can comment on or make changes to this bug.