Why is the initial display of WKWebView slow on iOS/Objective-C (Swift)?(Native Gawa, Hybrid)

Asked 2 years ago, Updated 2 years ago, 174 views

  • Gawa Native/Hybrid app development using iOS's WKWebView
  • Use WKWebView with Objective-C (Swift).
  • View/Close HTML (web page) in WKWebView with native button tap
  • Checked the speed of the Yahoo page/"Hello World!" simple page.
  • It takes between 1. and 2.5 seconds for the display to complete.
  • Even if it's the same URL, the display speed (display time) varies every time in Repeated Application Launch/Repeated Operation.
  • The display speed (display time) varies from URL to URL.
  • How it is displayed is instantaneous after the above time when it is white, and it is not displayed from the read part.
  • In the app, the screen transition of the app screen is done in an instant, and only WKWebView takes 1.?sec to 2.5sec.
  • Created a browser app
  • Enter URL 表示 Display button tap 一瞬 HTML page is displayed in an instant
  • No matter how many times you try in that state, it will appear in an instant.
    一瞬 Moment is so fast that it is impossible to measure visually.
  • Does WKWebView take between 1. and 2.5 seconds to generate?
    時間The reason why there is a variation in time is that what happens when you create it inside the library?
  • To reuse the generated WKWebView, the generation process is for the first time only.
  • First time only takes 1.?seconds to 2.5 seconds
  • The second and subsequent display is instantaneous.= Same speed as browser.
  • Why can't I find information about slow generation and display of WKWebView?
    (There is a lot of information that the display is fast.No fast or slow generation information.)
  • If the program/use of WKWebView is different, is there a case where the generation/view takes 1.?sec to 2.5sec is displayed correctly?

swift ios objective-c wkwebview

2022-09-30 21:33

1 Answers

This is a self-answer.

Generating WKWebView takes a few seconds (e.g., 1.5 to 2.5 seconds タイミング Timing, time varies by terminal).

1. I can't make a definitive decision because I can't find any sentences or information such as "It doesn't take long / it takes time to generate" or "Specifications" or "How to speed up generation / cause of delay".
2. I created a separate test application for this verification, but it is still slow to generate.
3. Swift, Objective-C, and videos of development apps from different countries show that generation takes a few seconds (including some predictions).
4. It's just a supplement."I contacted Apple, but it was ""I can't answer"".":Note: There is a possibility that the inquiry to Apple itself was not answered due to a problem.


2022-09-30 21:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.