FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Isomorphic performance

Open arinwt opened this issue 6 years ago • 4 comments

It looks like performance functions were added in Node 8.5+. https://nodejs.org/api/perf_hooks.html#perf_hooks_perf_hooks_performance

Right now we are using performance-now for isomorphic performance.now() functionality. We also have a reference to performance.getEntriesByType().

Replace window.performance with perf_hooks.performance in case of Node.

arinwt avatar Sep 16 '20 20:09 arinwt

Cool! So we can get rid of the performance-now polyfill as well

heliocliu avatar Sep 16 '20 20:09 heliocliu

@arinwt @heliocliu Would this be a good first issue for an external contributor?

tylerbutler avatar Sep 17 '20 02:09 tylerbutler

@tylerbutler probably, but I believe Arin already began working on this and someone already checked in an isomorphic break that depends on this that needs to be resolved soon or backed out

heliocliu avatar Sep 17 '20 03:09 heliocliu

@heliocliu Thanks; makes sense.

tylerbutler avatar Sep 17 '20 03:09 tylerbutler