You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "75341704 (via GitHub)" <gi...@apache.org> on 2023/08/16 10:19:51 UTC
[GitHub] [cordova-ios] 75341704 opened a new issue, #1363: The long time of loading image in the img tag cause that the app stuck on the splash screen
75341704 opened a new issue, #1363:
URL: https://github.com/apache/cordova-ios/issues/1363
# Bug Report
## Problem
### What is expected to happen?
If it takes a long time to load image in the img tag, the app start directly.
### What does actually happen?
The long time of loading image in the img tag cause that the app stuck on the splash screen.
It seems to be a common problem related to the src not only in the img tag
but also in the other tags such as script(without defer) or link
## Information
<!-- Include all relevant information that might help understand and reproduce the problem -->
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
As the snapshot hereunder, it tooks about 14 seconds to load the image in the img tag and the app stuck on the splash screen.
<img width="1045" alt="image" src="https://github.com/apache/cordova-ios/assets/3381792/280d5b0b-8689-41aa-aa3a-cd28c2ad614a">
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
### Version information
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
Installed platforms:
ios 6.1.0
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [ ] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [ ] I included all the necessary information above
--
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: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-ios] breautek closed issue #1363: The long time of loading image in the img tag cause that the app stuck on the splash screen
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #1363: The long time of loading image in the img tag cause that the app stuck on the splash screen
URL: https://github.com/apache/cordova-ios/issues/1363
--
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: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-ios] breautek commented on issue #1363: The long time of loading image in the img tag cause that the app stuck on the splash screen
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #1363:
URL: https://github.com/apache/cordova-ios/issues/1363#issuecomment-1680513416
Based on the image provided the issue is a connection issue.
Your application code and assets should be embedded with the app. Downloading assets should be reserved for dynamic content.
The image shows that you're downloading an image over the network on a `ss1.baidu.com` server and that request took almost 15 seconds to download a 5kb image.
The timeline line on the right shows it took an insignificant small time to resolve the domain which is represented by the purple block. This is the DNS query. it seems like 90% of the time spent was waiting on the TCP connection, represented by the yellow block. This means that `ss1.baidu.com` was slow to respond. The red block represents the SSL handshake, which appears normal, and the green block represents the time spent waiting on the content response. There is another block representing the download time but it's not really visible in the graphic, which means it probably took no time at all to actually downoad the 5kb image.
What this highlights is opening the connection to `ss1.baidu.com` is slow.
Like all network tasks, networks by their nature is not guaranteed and it is expected that poor or lack of a network connection will occur from time to time. It's the app developers responsibility to handle these situations.
If this is affecting your app startup, embedding your core app assets would be the ideal solution, which eliminates the network variables. If you cannot embed these assets for whatever reason, then you're next best solution is to defer loading the assets (using the `defer` attributes where applicable or move to use `XMLHttpRequest` to load in the request instead of loading it in via `img`, or using some network load means that doesn't block the DOM from being "loaded".
Closing as not a bug.
--
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: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org