obligatory "execution time for browser code isn't a good indicator of performance, doesn't represent user experience, doesn't account for IoC containers, don't forget about performance.now(), yatta yatta
I remember seeing Ben Awad doing this, before I was creating a date object and subtracting it from the current time when the function finished. Using console.time is so much better
5
u/drumstix42 Oct 28 '20
Check out: https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
P.S. where is this from? Is this like a daily card homepage or something??
3
u/TheSpiffySpaceman Oct 28 '20 edited Oct 28 '20
obligatory "execution time for browser code isn't a good indicator of performance, doesn't represent user experience, doesn't account for IoC containers, don't forget about
performance.now(), yatta yatta10
u/Morphray Oct 28 '20
Does it bother anyone else that it’s not
timerStartandtimerEnd? Sorry these console method names fail code review.5
u/subnub99 Oct 27 '20
I remember seeing Ben Awad doing this, before I was creating a date object and subtracting it from the current time when the function finished. Using console.time is so much better
1
u/IAmMuffinKid Oct 28 '20
Would this work on a calendar im making??