-
Notifications
You must be signed in to change notification settings - Fork 9
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
Min React Native/Hermes version supported? #35
Comments
Hi @ryantrem, sorry for the delay! I have used this with React Native The items labelled anonymous are probably just anonymous functions, or it is possible that source maps are not provided during profiling. The information about the line numbers as well as the exact function names are extracted from source maps, so I think that is where the issue might be. In case the source maps are not provided, the function names as well as line numbers as displayed as they are in the build file. I'm concerned about the timing information, could you share a screenshot of this and the profile itself? I want to verify the profile itself and see if the samples are taken correctly. |
Thanks @saphal1998 for getting back to me, much appreciated!
It seems more than just that. For example, when I click on one of the Anonymous blocks, I see these details:
So it seems like it thinks the function is
I debugged the hermes-profile-transformer code a bit (while executing
In the screenshot below, you can see blocks that are the root of the callstack taking 80+ms. My expectation would be the Here is the profile pictured above: Also, I created a branch of my project where it is very easy to repro this by doing the following:
|
Hi, I wasn't able to reproduce this because of
I think I might be missing this file, or something. Can you please let me know? |
Thanks @saphal1998 for giving it a shot! If you cloned my repo (https://github.com/ryantrem/BabylonReactNative), then you just need to check out the branch I made for testing this out ( |
@ryantrem Was curious if your app also crashes upon disabling profiling? |
It often does the first time I try, but then works on subsequent tries. I haven't tried to diagnose this yet. |
Hi @saphal1998 - did you have any additional ideas on this issue? |
Hi @ryantrem I'm not quite able to reproduce this, so I don't have any specific ideas for this issue atleast. I don't think there's a lot that can be done if the timing information is inaccurate, I tried to manually trace the function call stack as indicated by the profile, and it did make sense to me. (Just to be more sure about this, please do send me the Although, some issues that I have identified about the metadata are -
For example -
So the current way to obtain the names of the functions is by doing some regex matching with the name field, which in most cases is a name of the function followed by the url/position where we can access the function For eg: It worked for the functions we write and the function in React, but I'm not sure why it didn't map over accurately to other packages. Something to look into perhaps. |
Thanks @saphal1998 - when you say:
Do you mean you get different results than what I shared earlier in this issue?
The profile I attached earlier is long gone, but I collected a new one and include the
In this case, what I think would be most useful (if possible) is to have the category be the full name of the scoped package (e.g.
Will you point me to the code that does that? |
Hi @ryantrem, really sorry for the very late response, somehow I didn't get notified about this, very sorry about that.
No, my app seems to consistently crash on
Great, I can try this out.
I agree, the code for this is here. I think we can just change dirs[2] (which points to the package name in case of non-scoped packages).
Sure, I think this is where it is done now. For some reason, the profiles seemed to have the format of |
Question
I tried it out with my React Native app running on React Native 0.63.1 with Hermes enabled, but when I load the trace in Chrome Dev Tools, every item in the view is labeled as "anonymous". There are some details that list file names and line numbers specifically in the flame chart, and while the file names look like they could be correct, the line numbers make no sense when I look at the source. Additionally, the timing information doesn't make sense, as there are root level blocks in the flame graph that say they took ~250ms which is not possible as I'm using
requestAnimationFrame
to render graphics at 60fps.Since it seems like it isn't really working, my question is whether there is a min version of React Native (or Hermes specifically) supported by hermes-profile-transformer. Should it work for the version of Hermes included in React Native 0.63.1?
The text was updated successfully, but these errors were encountered: