Very low performance with WKWebView

Bugs will be moved here once resolved.

Post » Fri Jan 20, 2017 1:56 pm

Problem Description
PhoneGap, Intel XDK 3759, Cordova CLI any 6.2.0 or 5.4.1, export to iOs 9 with WKWebView
behaves like WKWebView is not present at all.

Attach a Capx
https://drive.google.com/file/d/0B14pUO ... tycG8/view

Description of Capx
One layout with 8 sprites and 8 text objects.
On layout start ->
project file "plank1.png" is loaded into the sprites
project file "text.txt" is loaded into the texts
Every 2 seconds layout restarted


Steps to Reproduce Bug
  • Export from Construct with enabled WKWebView option
  • Opened Intel XDK projects
  • Export to iOs
  • Run in sandbox mode on iphone 6 or ipad 3 with ios 9

Observed Result
On every layout restart, noticeably slow loading project files

Expected Result
Invisibly fast loading of files like in android with standart Webview

Affected Browsers
  • Safari: problem occurs
  • Chrome: all ok

Operating System and Service Pack
Windows 8.1

Construct 2 Version ID
241 beta
B
17
S
6
G
1
Posts: 130
Reputation: 2,023

Post » Fri Jan 20, 2017 2:03 pm

Behavior of my another project in various technologies:
iPad:
https://youtu.be/aDoUBmsMraA
iPhone:
https://youtu.be/FoyZgaCYgG0
Sony:
https://youtu.be/rKdxqCd5Pc8

It looks like wkwebview does not switch on. Any actions happens very slowly in all my projects. I could use a stable release 239, but it can't load project files via url that is actively used in the project.
B
17
S
6
G
1
Posts: 130
Reputation: 2,023

Post » Fri Jan 20, 2017 4:59 pm

I did a WKWebView iOS build with PhoneGap Build and it was perfectly fast on an iPad Air 2 running iOS 10.2. It loaded within a few hundred milliseconds. It wasn't instant, but that's definitely reasonable performance.

Besides, WKWebView improves Javascript performance, but loading files from storage isn't affected by that. So I would not expect to see any performance difference on this test vs. UIWebView. Also, it's possible Android devices have higher-quality storage and better performance for this particular test.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Sat Jan 21, 2017 10:02 am

@Ashley
I begin to understand ... but is there any workaround? My project uses a massive downloading of files: sprites, texts, fonts (multiple localizations).
B
17
S
6
G
1
Posts: 130
Reputation: 2,023

Post » Sat Jan 21, 2017 12:10 pm

I don't think so. Sometimes loading a lot of content takes a while!
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Sun Jan 22, 2017 9:37 am

Ashley wrote:I don't think so. Sometimes loading a lot of content takes a while!

But it is fast enough on Android, and unacceptably slow on iOs. The same task.

Ashley wrote:Besides, WKWebView improves Javascript performance, but loading files from storage isn't affected by that. So I would not expect to see any performance difference on this test vs. UIWebView. Also, it's possible Android devices have higher-quality storage and better performance for this particular test.

Could it be that an AJAX object does not work correctly on iOS ? Or the GPU acceleration does not turn due to some reasons, although WebGL is enabled in the project. Because it looks so that all works slowly.
B
17
S
6
G
1
Posts: 130
Reputation: 2,023

Post » Sun Jan 22, 2017 12:30 pm

There is always a performance difference between OSs, versions of the same OS, and different hardware.

AJAX works properly, since your example functions correctly.

GPU acceleration has no effect on this, since loading something from disk doesn't involve any rendering.

You can mitigate slow loading with the usual techniques: load less, lazy-load (only load it the first time you need it), find another way of storing/loading data, etc.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382



Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests