browser-polyfill icon indicating copy to clipboard operation
browser-polyfill copied to clipboard

too many console.warn() messages from performance.js

Open MillerGregor opened this issue 5 years ago • 1 comments

It looks like the performance.js polyfill has its functions called often, and adb can't handle all the console.warn() statements.

Conditions:

  • running on connected android device via adb
  • RN on device settings: JS Dev Mode checked
  • using expo-three & expo-gl

inspect the adb logs via: adb logcat *:S ReactNative:V ReactNativeJS:V

A console.warn() is issued for each call to window.mark, .measure, .clearMarks, and .clearMeasures once every 2ms. Although disabling YellowBox messages does hide them, adb still gets choked up and the app soon crashes.

Full disclosure: I'm running from WSL2 with adb executing on the W side and rn-cli on the L side. (please don't judge)

Could you do something other than a console? thanks

MillerGregor avatar Aug 11 '20 18:08 MillerGregor

You can try my @flyskywhy/react-native-browser-polyfill, the commit Use @flyskywhy/react-native-gcanvas and event-target-shim to support render zdog and mousemove in zdog also include comment the .measure .mark code which crash the app.

flyskywhy avatar Jun 19 '21 00:06 flyskywhy