Closed Bug 543459 Opened 16 years ago Closed 16 years ago

The new duplicates.cgi is somewhat slow on large databases

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 3.6

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

(Keywords: regression)

Attachments

(1 file)

Just for the heck of it, I tested out the new duplicates.cgi on my local copy of the bmo database. It was so slow I couldn't get it to return, even after several minutes. It looks like the problem is actually in the Perl code, not in what we're doing in the database, so I'm going to do some profiling and figure things out. I want bug 514970 to land first, though, so that my performance changes aren't going to conflict with that very large cleanup patch.
Flags: blocking3.6+
Okay, I did some testing, and actually what was happening on the bmo database was that there was a type of duplicate loop that the loop-detection code wasn't catching. I'm going to just add the fix to the patch in bug 514970. It does seem that duplicates.cgi is still a bit slow, though, so I'm going to investigate what I can do to speed it up.
Summary: The new duplicates.cgi is so slow that on bmo it will never return → The new duplicates.cgi is somewhat slow on large databases
Okay, so the problem is the line: my %since_dups = @{$dbh->selectcol_arrayref( That is, populating since_dups takes up most of the time.
Attached patch v1Splinter Review
Okay, this pretty much fixes it! :-) Apparently using INTERVAL is much faster than using TO_DAYS. I also noticed that massive calling of Bugzilla->params was adding a small bit of time to the profile in some places, and it was an easy fix, so I fixed it.
Assignee: general → mkanat
Status: NEW → ASSIGNED
Attachment #424609 - Flags: review?(LpSolit)
Attachment #424609 - Flags: review?(LpSolit) → review+
Comment on attachment 424609 [details] [diff] [review] v1 I have a too small DB to test perf improvements. I will trust your testing. r=LpSolit
(In reply to comment #1) > Okay, I did some testing, and actually what was happening on the bmo database > was that there was a type of duplicate loop that the loop-detection code wasn't > catching. Shouldn't we have a separate patch for 3.4, with only this fix?
Flags: approval+
(In reply to comment #5) > Shouldn't we have a separate patch for 3.4, with only this fix? Oh, no, add_indirect_dups is new for 3.6.
Committing to: bzr+ssh://mkanat%40bugzilla.org@bzr.mozilla.org/bugzilla/trunk/ modified duplicates.cgi modified Bugzilla/User.pm Committed revision 6953.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: