-
Notifications
You must be signed in to change notification settings - Fork 665
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
x2 memory usage + potentially memory leak. #221
Comments
This seems related to #164, which discusses a memory leak in It seems likely that the fix is related to your issue - can you try upgrading Hermes and seeing if that works? Note that Hermes 0.4.1 works with RN 0.62.0. |
@avp yep. But I can try upgrading no earlier than next week. JSC solves my current problem |
@punksta Have you checked Hermes 0.4.1? |
@sinxwal unfortunately I just switched to JSC and I don't have time for experiments. I will update this issue if I try it. |
@punksta Thanks, mate. Switching to JSC is so expensive( |
@sinxwal you mean things like facebook/react-native#25494 ? |
@punksta do you have an idea why the Java memory and the stack are so different between the two graphs? Shouldn't they be the same? |
@tmikov Indeed stack usage is very different: 20mb (hermes) vs 1.2mb (jsx). But I don't know why, unfortunately |
@punksta AFAICT, it is the opposite: 1.2mb Hermes vs 20mb jsc. That actually makes sense - Hermes doesn't use the native stack, while JSC does. So the Hermes "stack" would count as "native memory". If we add them together we get about 75MB total native memory, approximately the same between both engines. Which is disappointing for us, of course, but not awful. There are two remaining mysteries:
|
@tmikov you are right. I can't recall any deep recursions in the app. Let me describe what the app does. It loads about 80mb by chunks and writes it into sqlite. So data flow is the following:
I assume that gc could not release memory allocated for java objects in one of these components. I will try to explore memory dump. |
I was debugging out-of-memory errors of production app and found that
android performance RAM monitor
tested on:
hermes 0.2.1
JSC r241213
You can clearly see how memory was growing and wasn't getting free
note
I think it's something either related to json parsing or
fetch
api because the app loads large json objects (10*5mb)The text was updated successfully, but these errors were encountered: