-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16185/#review30273
-----------------------------------------------------------

Ship it!



src/webui/master/static/js/controllers.js
<https://reviews.apache.org/r/16185/#comment57962>

    Can you add a comment as to why this is needed? (A distillation of your 
review description would be nice).


- Ben Mahler


On Dec. 11, 2013, 6:21 p.m., Ross Allen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16185/
> -----------------------------------------------------------
> 
> (Updated Dec. 11, 2013, 6:21 p.m.)
> 
> 
> Review request for mesos.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Made all relative dates relative to poll time.
> 
> When Angular tries to resolve a filter, it runs it twice to see if the
> value changes. Without passing a reference date to `relativeDate`, the
> function instantiates a new `Date` to use as the reference. In the
> surprisingly frequent case when rendering occurs on the edge of a minute,
> dozens of `relativeDate` calls will return two different values if the
> filter is resolved before- and after the minute edge.
> 
> For example:
> 
>     Render starts at 12:13:59.999
>     $digest calls relativeDate, returns "1 minute ago"
>     $digest calls relativeDate 1ms later, returns "2 minutes ago"
>     Angular throws, "Error: 10 $digest() iterations reached. Aborting!"
> 
> By passing the pollTime to all relative dates, the dates are all
> relative to the same moment in time, and $digest always resolves
> properly.
> 
> Note: Because page rendering is unfortunately painfully slow on some
> pages when there is lots of data, this case happens frequently.
> 
> 
> Diffs
> -----
> 
>   src/webui/master/static/framework.html 
> 92f01ad2e2fbbabaca3a01d325a83f1d8cb25ffa 
>   src/webui/master/static/frameworks.html 
> f6594aeb29c9fa06cc26745d22b52526451791dc 
>   src/webui/master/static/home.html bccffd907954a38353b3e2af319d2659ba0f725f 
>   src/webui/master/static/js/app.js 37b423e04cddac70cbee2211f8e2910ef013df46 
>   src/webui/master/static/js/controllers.js 
> 5308bb94cd2e21fc97abf88cef55a123fdc1008c 
>   src/webui/master/static/slave.html e1dabc0b04dec404a0aabd52d0387a0af70ad40d 
>   src/webui/master/static/slaves.html 
> 99b1c355be1afc0dfa917960ec9d2e699bd3ad1f 
> 
> Diff: https://reviews.apache.org/r/16185/diff/
> 
> 
> Testing
> -------
> 
> Rendered each page with the pollTime changes in Chrome, Firefox, and Safari.
> 
> 
> Thanks,
> 
> Ross Allen
> 
>

Reply via email to