window.setInterval(() => {
this.$scope.$apply(function(){
this.currentTime = new Date();
});
}, 1000);
Understanding a frame
document.querySelector('.set-size').addEventListener('click', function(event) {
// get all the paragraphs
var ps = document.querySelectorAll('.lipsum-blocks p');
var i = ps.length;
var size;
while (i--) {
// looking at the sizer's offsetWidth on each loop - this is the slow bit
ps[i].style.width = sizer.offsetWidth + 'px';
}
event.preventDefault();
});
Response: respond in under 100ms
Animation: produce a frame in 10ms
Idle: maximize idle time
Load: deliver content under 1000ms
Are there more ?
Real world case studies ?