add a new method to ember which just returns current values

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: glob, Assigned: dkl)

Tracking

Development
x86
macOS

Firefox Tracking Flags

(Not tracked)

Details

in order to experiment with the performance characteristics of the ember.show call, we're going to create a new method which we'll use to return a lesser dataset.
How will it be different than the Bug.show call?
(In reply to Erik Bryn from comment #1)
> How will it be different than the Bug.show call?

it'll be bug.get + comments + attachments.  basically the bug's current values only (nothing relevant to editing a bug).  on my development system the difference is ~220ms vs ~1700ms.
Any news on this work?
Byron. Is this something I can take over working on?

Thanks
dkl
sorry about the delays here; dkl - i'll send you what i've done on this so far.
Assignee: glob → dkl
Pushed this change to bugzilla-dev.allizom.org for testing.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2-dev/                                                                                            
modified extensions/Ember/lib/WebService.pm
Committed revision 8601

Example url:

https://bugzilla-dev.allizom.org/rest/ember/bug/856410

dkl
Flags: needinfo?(erik.bryn)
Thanks dkl.

One issue I noticed right away is that it doesn't seem to support the `last_update_time` parameter, which keeps me from being able to use it for polling.
Flags: needinfo?(erik.bryn)
Sorry, I meant the `last_updated` parameter.
Also, does this API suffer from bug 945535?
(In reply to Erik Bryn from comment #9)
> Also, does this API suffer from bug 945535?

Yes. The way we load attachments in Ember.bug and Ember.show so both have the same issue with using a separate DB call for each attachment instead of consolidating them together into a single DB call.

dkl
(In reply to Erik Bryn from comment #8)
> Sorry, I meant the `last_updated` parameter.

Ok. will try to work on this today/tomorrow as in SF for the week. Right now it just returns all current values all of the time to get the method out for feedback. The last_updated time will give same data structure, just limiting of the fields, attachments, comments that are returned based on which ones changes since the last_updated timestamp.

dkl
Pushed another revision of this change to bugzilla-dev.allizom.org for testing.

Example urls:

https://bugzilla-dev.allizom.org/rest/ember/bug/856410
https://bugzilla-dev.allizom.org/rest/ember/bug/856410?last_updated=2013-12-08T12:00:04Z

Added last_updated param (similar to Ember.show) to only include fields, comments and attachments since the date specified.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2-dev
modified extensions/Ember/lib/WebService.pm
Committed revision 8609. 

dkl
Flags: needinfo?(erik.bryn)
I noticed that `last_change_time` is always returned. I believe that differs from the Ember.show API. Don't think there is any reason to return it.
Flags: needinfo?(erik.bryn)
(In reply to Erik Bryn from comment #13)
> I noticed that `last_change_time` is always returned. I believe that differs
> from the Ember.show API. Don't think there is any reason to return it.

Fixed.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2
modified extensions/Ember/lib/WebService.pm
Committed revision 9190. 

dkl
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Can you deploy that change to staging?
(In reply to Erik Bryn from comment #15)
> Can you deploy that change to staging?

Done
You need to log in before you can comment on or make changes to this bug.