facebook / react-native

A framework for building native applications using React

Home Page:https://reactnative.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jsSchedulingOverhead warnings

jaygarcia opened this issue · comments

I'm quite embarrassed to say that I'm finally getting around to debugging my JSX code on the phone.

I'm getting these jsSchedulingOverhead warnings:

jsschedulingoverhead

Should I be worried? Could it be caused by the fact that I'm debugging w/ chrome?

What it means is that the start date passed on the timer creation (Date.now() on JavaScript) is 800ms ahead of the current time on iOS ([NSDate now]), when you're running the app on the device and the executor on your computer it's very unlikely that the times will be the same at the millisecond level. So no, don't worry about it.

How can I not worry about though warrnings obscure a half of screen and I can't disable them...

I don't know if you realise, but this issue is from 6 months ago, and at the time there were no YellowBox, but yes, you can disable them, try:

console.ignoreYellowBox = ['jsSchedulingOverhead'];

@nicklockwood maybe we should remove this warning?

@tadeuzagallo I've no context on what this warning means, but it seems very spammy. Maybe YellowBox should have an upper limit on warnings displayed at once?

@tadeuzagallo looks like it's console.ignoredYellowBox not console.ignoreYellowBox

pasted console.ignoredYellowBox = ['jsSchedulingOverhead']; on my code and it worked on the phone, but Xcode still shows the warning.

captura de pantalla 2016-01-07 a las 6 20 25 p m

Do you have any workaround for this? for now I put my computer some seconds behind.

This warning is clogging up my Chrome console, repeating indefinitely and obscuring all relevant console logs. Is there any way around this except changing the computer's cloclk? console.ignoredYellowBox = ['jsSchedulingOverhead']; only removes the warning from the phone, not the Chrome or Xcode consoles.

+1

This is happening to me too, and making debugging while running on a device impossible. Why is this request closed? We need a way to disable these warnings in Chrome/Xcode too.

It's clearly affecting a bunch of other people, cf: root-two/react-native-drawer#44, #2046, react-native-camera/react-native-camera#32, #5136 etc.

Thanks

Temporary workaround: comment out line 179 of React/Modules/RCTTiming.m

image

commented

+1

Re-opening because this is a common problem when developing on a device.

commented

+1. Seems commenting out that line is the only effective way to remove the warning. by @lrettig #1598 (comment)

I agree with everyone that this is an annoying issue developing on a device. I've pushed a possible fix in #5731, will try to poke some people at Facebook to review the change.

@lrettig your commenting out method works well

Wow this is a year old simple issue and still has no progress!

Warning removed in 2d27cf0. Sorry that took so long!