Closed
Bug 1122435
Opened 10 years ago
Closed 10 years ago
Reduce the devtools protocol traffic generated by the AnimationPlayerActor/Front
Categories
(DevTools :: Inspector: Animations, defect)
DevTools
Inspector: Animations
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 38
People
(Reporter: pbro, Assigned: pbro)
References
Details
Attachments
(2 files)
7.09 KB,
patch
|
miker
:
review+
|
Details | Diff | Splinter Review |
1.07 KB,
patch
|
miker
:
review+
|
Details | Diff | Splinter Review |
Animations are time-dependent, that's what they are, and so any devtools UI that wants to show the state of an animation (like the new Animation Inspector panel) is bound to have to regularly go via the protocol to know what's the state of the animation at the time.
The way the Animation Inspector panel does this now is it runs a loop to contact, at regular intervals, the current AnimationPlayerActor(s) and get its(their) state(s).
It's already a little bit optimized because the interval is rather slow, it doesn't need to run so often because the timeline widget progresses on its own using a local requestAnimationFrame loop, and only re-synchronize whenever the new state from the actor is retrieved.
In order to optimize this further, we can do 2 things:
- the actor could only send the state properties that have changed since the last update,
- the front could stop polling when the animation has ended.
Assignee | ||
Comment 1•10 years ago
|
||
I have 2 patches with tests for this. I'll attach them in a minute.
Assignee: nobody → pbrosset
Assignee | ||
Comment 2•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8550191 [details] [diff] [review]
bug1122435-1-animation-actor-reduce-traffic v1.patch
Mike, here's the patch that makes the AnimationPlayerActor only sends the bits of the state that have changed since last time.
This is to reduce the traffic, as explained in this bug's first comment.
Attachment #8550191 -
Flags: review?(mratcliffe)
Assignee | ||
Comment 4•10 years ago
|
||
And this second, simpler, patch makes the AnimationPlayerFront stop polling the actor once the animation has finished.
Attachment #8550193 -
Flags: review?(mratcliffe)
Assignee | ||
Comment 5•10 years ago
|
||
Green try build for these patches: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8621430dff31
There's one weird dt failure that I'm going to consider as unrelated considering it occurs in other test directories and before the new test introduced here run.
Comment 6•10 years ago
|
||
Comment on attachment 8550191 [details] [diff] [review]
bug1122435-1-animation-actor-reduce-traffic v1.patch
Review of attachment 8550191 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry for the delay in getting around to this... I have been trying to solve problem that turned out to be a platform issue.
Simple patch, r+.
Attachment #8550191 -
Flags: review?(mratcliffe) → review+
Updated•10 years ago
|
Attachment #8550193 -
Flags: review?(mratcliffe) → review+
Assignee | ||
Comment 7•10 years ago
|
||
No problem Mike, that's nothing very urgent. Thanks for the reviews!
Keywords: checkin-needed
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6b82dcac375f
https://hg.mozilla.org/mozilla-central/rev/3307b281be25
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 38
Assignee | ||
Updated•9 years ago
|
Component: Developer Tools: Inspector → Developer Tools: Animation Inspector
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•