Uh oh!
There was an error while loading. Please reload this page.
In ts.performance.now, bind window.performance.now - #9956
Conversation
Using an arrow function. Previously, it was set directly to window.performance.now, which fails when used on Chrome.
Incidentally, I ripped off |
Wesley Wigham (weswigham)
commented
Jul 26, 2016
👍 It's always a little disappointing how inconsistent the web is with what you can rip off its hosting object and what you cannot. |
And neither |
Wesley Wigham (weswigham)
commented
Jul 26, 2016
Nathan Shively-Sanders (@sandersn) That was why I thought it was okay to rip both off. 😞 |
One of the Mac builds timed out. I think it's OK to merge anyway. |
Wesley Wigham (weswigham)
commented
Jul 26, 2016
Nathan Shively-Sanders (@sandersn) This has been happening every few builds - I actually restarted a build last night that had been running for over an hour (I just assumed travis had hung). I don't know if it's a random pathological perf problem in TS that's only exposed on mac, or an issue with the travis infrastructure. |
mihailik
commented
Jul 27, 2016
FYI: compared Don't have an Edge to try. Here's the code below to run in DevTools console: varrunAndAgain=function(){setTimeout(function(){runMillion();runAndAgain();},1);};runAndAgain();functionrunMillion(){varnow_arrow=function(){returnperformance.now();};varnow_bind=performance.now.bind(performance);varstart=newDate(),tmp=0;for(vari=0;i<1000000;i++){tmp=now_arrow();}vararrow_time=newDate()-start;varstart=newDate(),tmp=0;for(vari=0;i<1000000;i++){tmp=now_bind();}varbind_time=newDate()-start;console.log('arrow '+arrow_time+'\tbind '+bind_time+'\t ratio '+(((10000*arrow_time/bind_time)|0)/100)+'%');} |
Does anybody use IE11 to debug TypeScript? Faster in Chrome is better in my book. |
Wesley Wigham (weswigham)
commented
Jul 27, 2016
AFAIK, most of the team doesn't use IE, so the faster in chrome/FF option does seem better. |
mihailik
commented
Jul 27, 2016
I totally agree, Chrome is a better target -- and the difference is small enough anyway. Only wanted to give more context 👍 |
Fixes#9954
Using an arrow function. Previously, it was set directly to window.performance.now, which fails when used in Chrome.