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
164d2a87
Commit
164d2a87
authored
Sep 16, 2014
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1039940: serialisation of objects for webservice responses is extremely slow
r=dylan,a=sgreen
parent
cfb4ad90
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Bug.pm
Bugzilla/WebService/Bug.pm
+8
-5
No files found.
Bugzilla/WebService/Bug.pm
View file @
164d2a87
...
@@ -1179,13 +1179,11 @@ sub _bug_to_hash {
...
@@ -1179,13 +1179,11 @@ sub _bug_to_hash {
# A bug attribute is "basic" if it doesn't require an additional
# A bug attribute is "basic" if it doesn't require an additional
# database call to get the info.
# database call to get the info.
my
%
item
=
%
{
filter
$params
,
{
my
%
item
=
%
{
filter
$params
,
{
creation_time
=>
$self
->
type
(
'dateTime'
,
$bug
->
creation_ts
),
# No need to format $bug->deadline specially, because Bugzilla::Bug
# No need to format $bug->deadline specially, because Bugzilla::Bug
# already does it for us.
# already does it for us.
deadline
=>
$self
->
type
(
'string'
,
$bug
->
deadline
),
deadline
=>
$self
->
type
(
'string'
,
$bug
->
deadline
),
id
=>
$self
->
type
(
'int'
,
$bug
->
bug_id
),
id
=>
$self
->
type
(
'int'
,
$bug
->
bug_id
),
is_confirmed
=>
$self
->
type
(
'boolean'
,
$bug
->
everconfirmed
),
is_confirmed
=>
$self
->
type
(
'boolean'
,
$bug
->
everconfirmed
),
last_change_time
=>
$self
->
type
(
'dateTime'
,
$bug
->
delta_ts
),
op_sys
=>
$self
->
type
(
'string'
,
$bug
->
op_sys
),
op_sys
=>
$self
->
type
(
'string'
,
$bug
->
op_sys
),
platform
=>
$self
->
type
(
'string'
,
$bug
->
rep_platform
),
platform
=>
$self
->
type
(
'string'
,
$bug
->
rep_platform
),
priority
=>
$self
->
type
(
'string'
,
$bug
->
priority
),
priority
=>
$self
->
type
(
'string'
,
$bug
->
priority
),
...
@@ -1199,9 +1197,8 @@ sub _bug_to_hash {
...
@@ -1199,9 +1197,8 @@ sub _bug_to_hash {
whiteboard
=>
$self
->
type
(
'string'
,
$bug
->
status_whiteboard
),
whiteboard
=>
$self
->
type
(
'string'
,
$bug
->
status_whiteboard
),
}
};
}
};
# First we handle any fields that require extra SQL calls.
# First we handle any fields that require extra work (such as date parsing
# We don't do the SQL calls at all if the filter would just
# or SQL calls).
# eliminate them anyway.
if
(
filter_wants
$params
,
'alias'
)
{
if
(
filter_wants
$params
,
'alias'
)
{
$item
{
alias
}
=
[
map
{
$self
->
type
(
'string'
,
$_
)
}
@
{
$bug
->
alias
}
];
$item
{
alias
}
=
[
map
{
$self
->
type
(
'string'
,
$_
)
}
@
{
$bug
->
alias
}
];
}
}
...
@@ -1224,6 +1221,9 @@ sub _bug_to_hash {
...
@@ -1224,6 +1221,9 @@ sub _bug_to_hash {
$item
{
'cc'
}
=
\
@cc
;
$item
{
'cc'
}
=
\
@cc
;
$item
{
'cc_detail'
}
=
[
map
{
$self
->
_user_to_hash
(
$_
,
$params
,
undef
,
'cc'
)
}
@
{
$bug
->
cc_users
}
];
$item
{
'cc_detail'
}
=
[
map
{
$self
->
_user_to_hash
(
$_
,
$params
,
undef
,
'cc'
)
}
@
{
$bug
->
cc_users
}
];
}
}
if
(
filter_wants
$params
,
'creation_time'
)
{
$item
{
'creation_time'
}
=
$self
->
type
(
'dateTime'
,
$bug
->
creation_ts
);
}
if
(
filter_wants
$params
,
'creator'
)
{
if
(
filter_wants
$params
,
'creator'
)
{
$item
{
'creator'
}
=
$self
->
type
(
'email'
,
$bug
->
reporter
->
login
);
$item
{
'creator'
}
=
$self
->
type
(
'email'
,
$bug
->
reporter
->
login
);
$item
{
'creator_detail'
}
=
$self
->
_user_to_hash
(
$bug
->
reporter
,
$params
,
undef
,
'creator'
);
$item
{
'creator_detail'
}
=
$self
->
_user_to_hash
(
$bug
->
reporter
,
$params
,
undef
,
'creator'
);
...
@@ -1248,6 +1248,9 @@ sub _bug_to_hash {
...
@@ -1248,6 +1248,9 @@ sub _bug_to_hash {
@
{
$bug
->
keyword_objects
};
@
{
$bug
->
keyword_objects
};
$item
{
'keywords'
}
=
\
@keywords
;
$item
{
'keywords'
}
=
\
@keywords
;
}
}
if
(
filter_wants
$params
,
'last_change_time'
)
{
$item
{
'last_change_time'
}
=
$self
->
type
(
'dateTime'
,
$bug
->
delta_ts
);
}
if
(
filter_wants
$params
,
'product'
)
{
if
(
filter_wants
$params
,
'product'
)
{
$item
{
product
}
=
$self
->
type
(
'string'
,
$bug
->
product
);
$item
{
product
}
=
$self
->
type
(
'string'
,
$bug
->
product
);
}
}
...
...
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