Skip to content
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

FILL500 is sometimes slow if webxdc is closed and reopened multiple times in a row #3488

Open
link2xt opened this issue Dec 14, 2024 · 3 comments
Assignees
Labels

Comments

@link2xt
Copy link
Contributor

link2xt commented Dec 14, 2024

It looks like WebRTC instances from previous run are not garbage collected and new FILL500 waits for them to get freed up or something like this.

Maybe if we don't reuse WebView and create a new one each time, the problem will be solved.
I.e. using this approach: https://developer.android.com/develop/ui/views/layout/webapps/webview#add-webview-oncreate
Currently Android code uses https://developer.android.com/develop/ui/views/layout/webapps/webview#add-webview-layout

@link2xt link2xt added the bug label Dec 14, 2024
@adbenitez adbenitez self-assigned this Dec 16, 2024
@adbenitez
Copy link
Member

I don't think this will help, every time you open a webxdc, a new intent is created and the WebxdcActivity is launched, so if the Webview is reused is because the activity is reused and in that case you still would have the same webview object, it doesn't matter if it is inflated from xml or created from java code

@adbenitez
Copy link
Member

would be interesting to see if the WebxdcActivity is actually destroyed for you before you click the webxdc again

@link2xt
Copy link
Contributor Author

link2xt commented Dec 16, 2024

So normally when activity is closed there is this chromium crash:

12-16 16:07:08.623 12816 12816 E chromium: [ERROR:aw_browser_terminator.cc(166)] Renderer process (13228) crash detected (code -1).
12-16 16:07:08.627  1312 15629 I ActivityManager: Killing 13228:com.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:3/u0a228i619 (adj 0): isolated not needed
12-16 16:07:16.594  1312  1546 I ActivityManager: Start proc 13263:com.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:4/u0i620 for service {com.b44t.messenger/org.chromium.content.app.SandboxedProcessService0:4}
12-16 16:07:16.648 13263 13263 I cr_WebViewApkApp: version=129.0.6668.70 (666807001) minSdkVersion=26 isBundle=false processName=com.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:4
12-16 16:07:16.654 13263 13263 W webviewchromiumloader: Failed to open relro file /data/misc/shared_relro/libwebviewchromium32.relro: No such file or directory

But if I open it quickly after closing, this does not help and I get slow progress bar logging this:

12-16 16:07:31.858 13300 13326 I chromium: [INFO:peer_connection_dependency_factory.cc(752)] Running WebRTC with a combined Network and Worker thread.
12-16 16:07:31.867 12816 12816 I chromium: [INFO:CONSOLE(0)] "Unrecognized Content-Security-Policy directive 'webrtc'.", source: https://acc6-msg20572.localhost/sandboxed_iframe_rtcpeerconnection_check_5965668501706.html (0)
12-16 16:07:31.875 12816 12816 I chromium: [INFO:CONSOLE(64)] "WEBRTC-WG: allocating", source: https://acc6-msg20572.localhost/webxdc_bootstrap324567869.html?i=0&href=https%3A%2F%2Facc6-msg20572.localhost%2Findex.html%23fur (64)
12-16 16:07:31.895 12816 12989 W System.err: 	at WV.d5.a(chromium-SystemWebView.apk-default-666807001:86)
12-16 16:07:31.895 12816 12989 W System.err: 	at org.chromium.android_webview.AwContentsBackgroundThreadClient.shouldInterceptRequestFromNative(chromium-SystemWebView.apk-default-666807001:15)
12-16 16:07:32.388 12816 12816 I chromium: [INFO:CONSOLE(77)] "WEBRTC-WG: waiting for gc", source: https://acc6-msg20572.localhost/webxdc_bootstrap324567869.html?i=0&href=https%3A%2F%2Facc6-msg20572.localhost%2Findex.html%23fur (77)
12-16 16:07:32.907 12816 12816 I chromium: [INFO:CONSOLE(77)] "WEBRTC-WG: waiting for gc", source: https://acc6-msg20572.localhost/webxdc_bootstrap324567869.html?i=0&href=https%3A%2F%2Facc6-msg20572.localhost%2Findex.html%23fur (77)
12-16 16:07:33.442 12816 12816 I chromium: [INFO:CONSOLE(77)] "WEBRTC-WG: waiting for gc", source: https://acc6-msg20572.localhost/webxdc_bootstrap324567869.html?i=0&href=https%3A%2F%2Facc6-msg20572.localhost%2Findex.html%23fur (77)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants