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
dec46c31
Commit
dec46c31
authored
Feb 01, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 543459: Speed up the new duplicates.cgi
r=LpSolit, a=LpSolit
parent
fde6d4aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
User.pm
Bugzilla/User.pm
+2
-1
duplicates.cgi
duplicates.cgi
+6
-5
No files found.
Bugzilla/User.pm
View file @
dec46c31
...
...
@@ -652,12 +652,13 @@ sub visible_bugs {
}
$sth
->
execute
(
@check_ids
);
my
$use_qa_contact
=
Bugzilla
->
params
->
{
'useqacontact'
};
while
(
my
$row
=
$sth
->
fetchrow_arrayref
)
{
my
(
$bug_id
,
$reporter
,
$owner
,
$qacontact
,
$reporter_access
,
$cclist_access
,
$isoncclist
,
$missinggroup
)
=
@$row
;
$visible_cache
->
{
$bug_id
}
||=
(((
$reporter
==
$user_id
)
&&
$reporter_access
)
||
(
Bugzilla
->
params
->
{
'useqacontact'
}
||
(
$use_qa_contact
&&
$qacontact
&&
(
$qacontact
==
$user_id
))
||
(
$owner
==
$user_id
)
||
(
$isoncclist
&&
$cclist_access
)
...
...
duplicates.cgi
View file @
dec46c31
...
...
@@ -180,16 +180,17 @@ my %since_dups = @{$dbh->selectcol_arrayref(
"SELECT dupe_of, COUNT(dupe)
FROM duplicates INNER JOIN bugs_activity
ON bugs_activity.bug_id = duplicates.dupe
WHERE added = 'DUPLICATE' AND fieldid = ?
AND "
.
$dbh
->
sql_to_days
(
'bug_when'
)
.
" >= ("
.
$dbh
->
sql_to_days
(
'NOW()'
)
.
" - ?)
GROUP BY dupe_of"
,
{
Columns
=>
[
1
,
2
]},
WHERE added = 'DUPLICATE' AND fieldid = ?
AND bug_when >= LOCALTIMESTAMP(0) - "
.
$dbh
->
sql_interval
(
'?'
,
'DAY'
)
.
"
GROUP BY dupe_of"
,
{
Columns
=>
[
1
,
2
]},
$reso_field_id
,
$changedsince
)};
add_indirect_dups
(
\%
since_dups
,
\%
dupe_relation
);
# Enforce the mostfreqthreshold parameter and the "bug_id" cgi param.
my
$mostfreq
=
Bugzilla
->
params
->
{
'mostfreqthreshold'
};
foreach
my
$id
(
keys
%
total_dups
)
{
if
(
$total_dups
{
$id
}
<
Bugzilla
->
params
->
{
'mostfreqthreshold'
}
)
{
if
(
$total_dups
{
$id
}
<
$mostfreq
)
{
delete
$total_dups
{
$id
};
next
;
}
...
...
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