-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite loop of "callbacks_poll" #1538
Comments
Thanks for reporting. In version 2.0.7 we fixed a bug in |
So, the infinite loop network log doesn't occur on 2.0.6. |
@mschipperheyn @kneth the callbacks_poll method reinvoke is intentional. This is used only in debugging to be able to support handling arbitrary callbacks called from the device side. This method is called only if there are no invocations of any method/get property etc for specified small amount of time from the application. We can improve this in the future by using websockets, but it's not a high priority right now. We have other issues with performance we are working on to fix (like #491) cheers |
@blagoev I think it's a high priority issue because the chrome debugger turn very slow and we almost cannot do any thing. Thanks. |
@blagoev network debugging is a nightmare with this constant polling, not the mention the network logging of the polling itself growths infinitely as well and eventually crashes the debugger or brings the computer to a halt. This can be filtered out by using a regex in the logging, but this has to be done every time you restart the debugger which is a poor experience. Perhaps this "specified small" amount of time can be made configurable, so that we can just set it to a much larger value and take any associated consequences for granted? |
i changed this in 'lib/browser/rcp.js' at line 292 (v2.0.12)
@blagoev what is arbitrary callback and when it is needed ? |
Guys by arbitrary callback I mean callbacks that can be fired at any point of time. For example one such callback are the callbacks for change notifications. The debugger works by piggy backing on normal debugger commands but if there are no invocations from the client side the debugger invokes this poll request, so callbacks are not left pending. This poll callback should happen only when there are no method invocations/property getters/setters etc to the debugger backend. If you are experiencing slow debugger there is bigger problem with it we outlined here #491 |
@blagoev Yeah, websockets would seem to be the way to go. For me, staying on 2.0.6 is an acceptable workaround for now. Thanks for being open about this. |
@blagoev could we perhaps create a module for ReactNative's CxxBridge and use the React Native bridge to post callbacks to the debugger because it already sets up a websocket? |
@fealebenpae Yes we could do that. it's a matter of priorities to spend the some time on it. |
Hi, any news on that? I'm currently using 2.2.12 and these callbacks_poll requests flooding my network requests. Thanks |
+1 |
7 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1, any news on that? i find it when i use redux-saga |
Please fix. |
Unfortunately we have had other priorities lately. I'll take it up with the rest of the team as a more general prioritization of debugging experience. |
This is what the logs come out as:
This seems to happen after keeping the connection open for a while. 1 - 3 minutes |
Is there a resolution for this? I am using Realm version 2.12.0 which is continuously making a request to |
@hannigand Unfortunately I have no updates to share. |
something tells me this is related to ROS not Realm Client. I tested with an older version of ROS and it seems fine. |
@agsole-asapp Thanks for the feedback. The PING/PONG is done to check if network or ROS is alive but it can be that it has a bad effect on the debugger. |
This is happening for me on This is causing the app to crash consistently when in debug mode. @kneth any update on the state of this ticket? is it on the roadmap? is it in progress? any ETAs? Edit: we opted to change the timeout as mentioned here to make development more bearable in debug mode. |
Unresponsiveness of the ream team makes this great idea and product a total crap :( |
Is this also the same when using Safari? See issue here |
I am also in a pickle. We cannot debug with Realm. Realm consistently is the stopping point for moving forward in our development. The sad part is that our application uses both Realm sync and non-synced. For testing, development, etc. we don't institute any listeners, we don't use a synced version of realm. I don't understand how this isn't somewhat of an important issue for the Realm team. It makes the product unusable. Please - can you give any insight into Realm causing debugging to become unusable, or what steps can be taken to fix it? |
I'm sorry you feel this way, but comments reiterating things already mentioned are hardly productive. The link in the comment just above yours points to a thread where we've outlined the reasons for the current limitations and there have been proposed workarounds when debugging on iOS. Beyond that, there's not much we can do until Facebook improves their debugger support. |
facing same app crash issue on iOS. Its sad realm team isn't taking it seriorusly :( |
I would think that at least on the realm.io website there would be a big warning right at the top of the introduction that debugging becomes problematic when using this product. I invested so much into using realm without the knowledge that I wouldn't be able to use JavaScript debugging anymore. On the bright side the fact that realm.io kills the development experience has made me into a much, much better programmer! I use reactotron for logging and have to write really good code! That being said it's a shame that this issue doesn't have a big warning banner displayed on the Realm.io website. |
@FirdousNath We are taking it seriously but we are waiting for React Native to make the debugging experience easier (for us with C++ code). @cyphire I see your point. Not that we try to hide it (https://realm.io/docs/javascript/latest/#chrome-debugging-is-slow). |
@kneth Well, to be honest, I would recommend changing the docs to 'forget about it' rather than 'it's slow' as there are a number of bugs (ranging from 3+ year old bugs #491 as mentioned by @blagoev as 'higher priority' in this very thread to ones that have a resolution but closed with no fix on your part; #1034 ) that make any sort of debugging in an app that includes realm extremely painful. Also, what does 'higher priority' mean in this context - can we expect a fix for #491 within the next 3 years and perhaps this bug might be fixed within the next 6 years? |
@matiasbuildops v2.28.0 (from May 2019) improves the performance of debugging. We are very interested in learning what use cases v2.28.0 didn't improve. |
@kneth yeah, performance is okay but this problem right here persists, making it nigh impossible to debug any application with network activity (which in 2019 is pretty much any app) - debugger network tabs are full of callbacks_poll. Also; see #1034 (or #2441 which seems to be a similar/same bug) as I mentioned in my earlier post which also persists to this day and the resolution is manually editing a .java file in node_modules. |
@matiasbuildops you are right. I gave up RealmJS because of those issues, after building my first app with it. The evolution of versions is quite slow, and if we are serious about our app, RealmJS is not an option. Maybe WatermelonDB would be a good fit for replacement, but I haven't really tried it yet. |
Life becomes much easier when you change realm to any other persistant library. I can say realm is pretty good for native Apps but worse for hybrid apps :( |
Still no solution of this problem! |
still no solution for this?! |
Any updates (or workarounds) on this folks? |
@heytulsiprasad After the issue was created, we batched the requests to lower the load. Unfortunately, it didn't solve all cases. If it is possible for you, you can also debug your app using Safari (MacOS + iOS only) by enabling DevTools and connect to your device's JavaScript context. |
No I'm on windows, think I have to depend on Reactotron from now on. Thanks for being quick to respond, @kneth. |
got any?? |
why does Realm do this? |
@mikheyrojo Realm JS is mostly implemented in C++ with callbacks to JavaScripts. When debugging, the C++ code is running on device/emulator and the JavaScript is running in Chrome. So it is the mechanism to get it to work. We are in the progress to moving to Hermes/JSI and Flipper (see #3792). This means that both C++ and JavaScript will run on device and we can eliminate this callback polling. |
➤ On 2021-11-11, Brian Munkholm commented: Closing as duplicate. |
So, it's YOU! :-)
I've been seeing this endless loop of "callbacks_poll" that is killing my debugging performance and pleasure.
Goals
Get rid of the endless loop of callbacks_poll in my networking request pane and the associated memory leak
Expected Results
No callbacks_poll visible and no memory leak
Actual Results
See image. Endless loop. Makes it hard to identify individual network requests and there seems to be an associated memory leak, although I can't guarantee that it is related.
Steps to Reproduce
Not sure. This happened after I upgraded Realm but I didn't realize it at the time. Here's my Realm setup
Code Sample
The text was updated successfully, but these errors were encountered: