Webview throttling at 80MB of ram, how can I increase this ?

273 views
Skip to first unread message

Thomas LAVOCAT

unread,
Jan 19, 2021, 2:06:56 PM1/19/21
to Chromium-dev

Hello,

I'm performing tests on the webview (v 79.0.3945) and I can see that the application never exceed 80MB of ram. This is weird because I think I have my aosp configured to allow much larger heap.

$ getprop | grep dalvik                                                                                                                                                                       
[dalvik.vm.appimageformat]: [lz4]
[dalvik.vm.dex2oat-Xms]: [64m]
[dalvik.vm.dex2oat-Xmx]: [512m]
[dalvik.vm.heapgrowthlimit]: [192m]
[dalvik.vm.heapmaxfree]: [64m]
[dalvik.vm.heapminfree]: [4m]
[dalvik.vm.heapsize]: [512m]
[dalvik.vm.heapstartsize]: [128m]
[dalvik.vm.heaptargetutilization]: [0.50]
[dalvik.vm.image-dex2oat-Xms]: [64m]
[dalvik.vm.image-dex2oat-Xmx]: [64m]
[dalvik.vm.isa.arm.features]: [default]
[dalvik.vm.isa.arm.variant]: [cortex-a9]
[dalvik.vm.lockprof.threshold]: [500]
[dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
[dalvik.vm.usejit]: [true]
[dalvik.vm.usejitprofiles]: [true]
[persist.sys.dalvik.vm.lib.2]: [libart.so]
[ro.dalvik.vm.native.bridge]: [0]

Is there a build arg that I can use to tweak this ?

Torne (Richard Coles)

unread,
Jan 19, 2021, 3:10:11 PM1/19/21
to Thomas LAVOCAT, Chromium-dev
WebView is just a library and doesn't have anything to do with how much RAM the app it's embedded into can use. What are you actually trying to accomplish? How are you testing it exactly?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/fae84f1c-0ec1-4f76-b947-b0e6ab425c20n%40chromium.org.

Bo Liu

unread,
Jan 19, 2021, 3:53:36 PM1/19/21
to Torne (Richard Coles), Thomas LAVOCAT, Chromium-dev
In case you are only looking at java heap. Most memory that webview consumes is not in the java heap. Look at other categories of memory in dumpsys meminfo.

Thomas LAVOCAT

unread,
Jan 28, 2021, 12:27:44 PM1/28/21
to Chromium-dev, Bo Liu, Thomas LAVOCAT, Chromium-dev, to...@chromium.org
Le mardi 19 janvier 2021 à 21:53:36 UTC+1, Bo Liu a écrit :
In case you are only looking at java heap. Most memory that webview consumes is not in the java heap. Look at other categories of memory in dumpsys meminfo.

On Tue, Jan 19, 2021 at 3:09 PM Torne (Richard Coles) <to...@chromium.org> wrote:
WebView is just a library and doesn't have anything to do with how much RAM the app it's embedded into can use. What are you actually trying to accomplish? How are you testing it exactly?

You are right and my question makes no sense. At the time I was writing it, I had issues where a video playing were having janky frames and was loading very slowly, I thought at that time it might be due to a memory limit forcing the rendering pipeline to download a small amount of video, then garbage collect to free some space and proceed until the end of the video. After that I changed the DefaultRenderer to the MediaPlayerRenderer and I saw a different behavior on video loading, so it was not a RAM issue at all.

Anyway, thanks for your answer,
Thomas
Reply all
Reply to author
Forward
0 new messages