What do you think the results would have been had you utilized RxJS vs. setInterval, which I believe is the preferred way to handle these types of periodic events.
Also, just thinking about the test scenario you propose. 10000 iterations in 50ms with random getting called 3 times, per iteration. That's a shit ton of operations. Honestly, I don't think that either of them are keeping up with that frequently a UI gets updated. My guess is that Angular 2 is throttling this to keep things more efficient and lower burden on the UI.
1
u/bigdubb2491 Feb 17 '16
What do you think the results would have been had you utilized RxJS vs. setInterval, which I believe is the preferred way to handle these types of periodic events.
Also, just thinking about the test scenario you propose. 10000 iterations in 50ms with random getting called 3 times, per iteration. That's a shit ton of operations. Honestly, I don't think that either of them are keeping up with that frequently a UI gets updated. My guess is that Angular 2 is throttling this to keep things more efficient and lower burden on the UI.
Some JS benchmarks would be helpful as well.