breautek commented on issue #1650:
URL: 
https://github.com/apache/cordova-android/issues/1650#issuecomment-1690364270

   Your config indicates that you're letting Cordova auto hides the 
splashscreen with a `0` delay, which (without checking) I believe occurs when 
the webview loads up.
   
   You can have a look at the [splashscreen 
plugin](https://github.com/apache/cordova-android/blob/e61e271f5bbb517a9598078f7a1ad7585bfe5f9c/framework/src/org/apache/cordova/SplashScreenPlugin.java#L131)
 that's embedded into the cordova framework to see when it exactly dismisses 
it. Note that by explicitly assigning `SplashScreenDelay` Cordova is treating 
this as a custom delay, so it creates a handler to be delayed `0ms` later (in 
otherwords when the next time the main thread is free).
   
   If this is taking more than 5 seconds to trigger then it could be a cause 
for the ANR. If this is the case, I suspect a plugin or plugin(s) to be the 
cause of the delay.
   
   If you remove the `SplashScreenDelay` preference, or set it to `-1` , then 
it should trigger Cordova to immediately set the keep flag to 
[false](https://github.com/apache/cordova-android/blob/e61e271f5bbb517a9598078f7a1ad7585bfe5f9c/framework/src/org/apache/cordova/SplashScreenPlugin.java#L166),
 which allows the Android to dismiss the splashscreen as soon as possible, 
though this may occur before your webview actually has finished loading.
   
    For more info on how splashscreens trigger ANR you can read: 
https://github.com/apache/cordova-android/issues/1510
   
   If your splashscreen is dismissing quickly (less than 5 seconds), then 
splashscreen is probably not the source of your ANR. In which case, you'll 
probably need to use Android Studio to 
[trace](https://developer.android.com/topic/performance/vitals/anr#pull_a_traces_file)
 the problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to