Software Archive
Read-only legacy content
17061 Discussions

Why is performance so poor compared to Cocoonjs?

Michael_P_1
Beginner
4,237 Views

Hi,

I'm currently working on an HTML5 game and have been using Cocoonjs to create native aps for IOS and Android.  CocoonJs has its problems, most notably no direct AdMob support (they are apparently working on adding that now), but the game's performance once on the devices was pretty good.

I exported the same game to my same Android device via Intel XDK and the games performance was absolutely terrible. It had been silky smooth and had very consistent timing (when exported via cocoonjs).  Once exported via XDK it had an absolutely terrible frame-rate and would alternate between insanely slow and then 2x speed as though it was trying to make up for lost time, yet always with the terrible frame-rate. The game became unplayable.

I thought CocoonJS was based on open-source technology.  Why does XDK compiler create such drastically inferior aps based on the same exact html5 files?

Is this massive performance discrepancy being addressed?

 

Thanks,
Mike

0 Kudos
27 Replies
PaulF_IntelCorp
Employee
857 Views

BTW -- we are working on implementing a Crosswalk 14 embedded build now that the appropriate bits have been provided by the Crosswalk Project team.

0 Kudos
PaulF_IntelCorp
Employee
857 Views

Embedded Crosswalk 14 build file sizes should be similar to prior versions, we're still using the same build technique. Those sizes might change when we are able to build with CLI 5 (and are able to build with the pluggable webview), but probably not significantly. I have no idea with CW15 will appear, it is not currently in a released state from the Crosswalk Project.

0 Kudos
PaulF_IntelCorp
Employee
857 Views

That is a warning. You can still build for CW7. The warning does not prevent you from building for CW7. The google play store may reject an app build with CW7, but that does not stop you from building with CW7 and distributing through other channels.

0 Kudos
Mikhail_M_
Beginner
857 Views

Hello!
Intel XDK is realy handy, but I can`t achieve normal fps with Crosswalk... In my case performance and game loading time is slower than when I compile version withot Crosswalk (just "Android" build)... :(  (But in Android build I does not have any sounds, so it can`t fit me)

And it looks like Chromium problem becouse when I play my project in browser, then performance in Chrome browser lower than in default Android browser...

Looking forward for Crosswalk 14-15! But after 1.5 years of project development and weeks of experimenting with exporting to Android devices I`m a "little bit" dissapointed...

0 Kudos
PaulF_IntelCorp
Employee
857 Views

@Mikhail -- your performance in the "default Android browser" will vary dramatically from device to device and Android version to Android version. The Crosswalk build includes a replacement runtime, which accounts for some of the delay in loading your app. To get better audio you should investigate some of the low-latency audio plugins and use those, rather than using the <audio> tag.

You can test Crosswalk 14 right now by using the "shared" build option. That will run your app using a Crosswalk shared library that is currently based on Crosswalk 14. See this doc for more details: https://software.intel.com/en-us/xdk/docs/choosing-crosswalk-build-options-shared-or-embedded. An embedded build for this version of Crosswalk is in process and should be available in the near future.

0 Kudos
Mikhail_M_
Beginner
857 Views

Thanks for reply Paul! I will try it!

0 Kudos
PaulF_IntelCorp
Employee
857 Views

@Matrix -- I'm putting this discussion back onto the public side of the forum so it can benefit others and we can more easily provide support from others.

p.s. I'm assuming you are building with CLI 4.1.2 and have the white list (domain list) set properly? Also, which version of iOS does your device contain? I believe web sockets is only supported on iOS 7.1 and above, if you're testing with an old iOS device it may not work.

Are you able to use the Debug tab to test this? Using what we call "debuggable App Preview"? This is a very good way to debug.

 
MATRIX R. 10:56
hi

1) i use cordova ios build (and not legacy buils because they are deprecated) right ?

2) yes build is with 4.1.2

   - but the domain list , what you mean set properly ? in my project with acces list there is only and * (star)

   -  and white list to internal thats all !!!

3) yes i have tested it on ios 7.1.2 and ios 8 and test on iphone 5s and 4s...

thanks for reply

 
You 11:04
All that sounds good, you've got your settings correctly set.

Can you explain what you mean by "the game will not connect to server game if the firewall is blocked" -- are you working behind a firewall? Most web sockets connections require first connecting to a server before they connect to the peer, so if the iOS devices are having trouble going through the firewall that might explain why this is not working. It could have something to do with the configuration of the iOS network, for which I have no expertise.

Have you tried using the Debug tab with your iOS devices and configured a "debuggable App Preview"? This is a very powerful debugging solution.

 

MATRIX R. 11:57
1)what is the use of "add another acces entry" ? maybe something related ? because it leave it empty (only one star "*"

2)i develop a web game with javascript / html5 wich is conneting to server but if a port that the server listen is used or if the firewall of the pc is activated the game can't connect to server

so i was  trying to implement the game thru crosswalk + construct 2

the problem as i told you are :

- for android it work but not on ios

remember that if i lunch the game from my iphone 4S BUT directly from browser it work !!!!

so since it work on browser and plus since it work on android ... i think it's problem of ios build

and i trying to use the debug app and will reply if there are news 

 
MATRIX R. 12:09
hi,

it work good with debug app preview but not when i build ipa

Regarding #1 -- multiple entries can be made for white listing, setting this to '*' means "all external addresses are accessible." See this article for details: https://software.intel.com/en-us/articles/cordova-cli-412-domain-whitelisting-with-intel-xdk-for-ajax-and-launching-external-apps#XDK2170andabove

Regarding #2 -- I'm wondering if your iPhone 4S has a sufficiently adequate webview. The webview does not always have the features that are available in the browser. Do you have access to an iPod, iPhone or iTab that is running iOS 8 that you can try?

0 Kudos
Reply