Software Archive
Read-only legacy content
17061 Discussions

android app extremely slow and iOS app heating and drains iPhone 6 battery

Renato_B_
Beginner
2,266 Views

I don't know what changed in the last Intel XDK updates, but something expressive really changed. Before these updates my apks run very well, smoothly and in the same velocity of the web browser. Now, a unique sprite that uses only a "bullet behaviour" move very slowly making the game unplayable. In the case of the ios apps, the device is heating and battery drain a few minutes later. Not to mention the fact the problems with cordova plugins. Sorry to ask but: why the Intel XDK became worse? Are you doing something to revert this situation? Do you have any idea how long to fix these issues? Thanks.

0 Kudos
32 Replies
Renato_B_
Beginner
844 Views

Paul

I had tried it but it's not worked. Besides that, I tested the game in the moto G and the performance was very poor too. As far as I know, moto G it is not part of the gpu blacklist, isn't?

0 Kudos
PaulF_IntelCorp
Employee
844 Views

Renato, I don't know which devices are on the blacklist. Please provide a copy of your project, not the APK files. I cannot get enough information about your project from the APK files. I need to see what options and settings you've got in your project, which means I need you to ZIP your ENTIRE project directory and provide a link to that. The built images don't help me.

0 Kudos
Renato_B_
Beginner
844 Views

I'm sending to you by PM.

0 Kudos
PaulF_IntelCorp
Employee
844 Views

Renato -- I need a ZIP of your XDK project directory, after you've imported it into the XDK from Construct2. What you sent me is the export from Scirra, it is not the XDK project. I need to see what you have after you've imported it into the XDK.

0 Kudos
Renato_B_
Beginner
844 Views

Sorry. I'm sending to you now.

0 Kudos
PaulF_IntelCorp
Employee
844 Views

Renato -- the project you provided me is incomplete. It references a bunch of images that are not included in the ZIP file you gave me. Please copy EVERYTHING in the XDK project directory into the ZIP file directly from the problem project.

0 Kudos
Renato_B_
Beginner
844 Views

I sent you again. Sorry.

0 Kudos
PaulF_IntelCorp
Employee
844 Views

Renato -- I don't see a ship, what do I have to do to get the ship to appear?

0 Kudos
PaulF_IntelCorp
Employee
844 Views

For those Construct2 users who are experiencing Crosswalk performance problems with CLI 5.1.1:

<!-- Many Cordova config.xml preferences can be added thru this file, see: -->
<!-- http://cordova.apache.org/docs/en/latest/config_ref/index.html -->
<!-- https://cordova.apache.org/docs/en/5.4.0/config_ref/index.html#link-3 -->
<!-- https://cordova.apache.org/docs/en/5.4.0/guide/platforms/ios/config.html -->
<!-- https://cordova.apache.org/docs/en/5.4.0/guide/platforms/android/config.html -->
<!-- https://cordova.apache.org/docs/en/5.4.0/guide/platforms/win8/index.html -->

<!-- Set the debuggable preference to true to build a remote CDT debuggable app for -->
<!-- Crosswalk apps on Android 4.0+ devices and Cordova apps on Android 4.4+ devices. -->
<preference name="debuggable" value="true" />
<!-- Set the debuggable preference to false before you build for the store. -->

<!-- use this feature to add command-lines to be used by Crosswalk builds on device -->
<!-- see http://peter.sh/experiments/chromium-command-line-switches/ for complete list -->
<intelxdk:crosswalk xwalk-command-line="--disable-pull-to-refresh-effect" />
<!-- ignore gpu blacklist for larger collection of gpu accelerated devices -->
<intelxdk:crosswalk xwalk-command-line="--ignore-gpu-blacklist" />
<intelxdk:crosswalk xwalk-command-line="--show-fps-counter" />
<!-- you must remove space between option dashes "- -" to uncomment an option -->
<!-- <intelxdk:crosswalk xwalk-command-line="- -ui-prioritize-in-gpu-process" -->

<!-- controls configuration of Crosswalk-Android "SurfaceView" or "TextureView" -->
<!-- see Sep 15 comments in https://crosswalk-project.org/jira/browse/XWALK-2233 -->
<!-- default is SurfaceView if >= CW15 and TextureView if <= CW14 -->
<!-- option can only be used with Intel XDK CLI5+ build systems -->
<!-- SurfaceView is preferred, TextureView should only be used in special cases -->
<!-- enable Crosswalk-Android TextureView by setting option to true -->
<preference name="CrosswalkAnimatable" value="false" />


<!-- see https://github.com/apache/cordova-plugin-splashscreen for details -->
<platform name="android">
    <!-- below requires the splash screen plugin -->
    <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
    <preference name="SplashScreen" value="screen" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="SplashScreenDelay" value="3000" />
    <preference name="SplashMaintainAspectRatio" value="false" />
</platform>

<platform name="ios">
    <!-- below requires the splash screen plugin -->
    <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
    <!-- <preference name="SplashScreen" value="Default" /> -->
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="FadeSplashScreen" value="false"/>
    <preference name="FadeSplashScreenDuration" value="3"/>
    <!-- <preference name="FadeSplashScreenDuration" value="3000"/> -->
    <preference name="ShowSplashScreenSpinner" value="false"/>

    <!-- below requires the status bar plugin -->
    <!-- docs: https://github.com/apache/cordova-plugin-statusbar -->
    <!-- see http://devgirl.org/2014/07/31/phonegap-developers-guid -->
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="StatusBarBackgroundColor" value="#000000" />
    <preference name="StatusBarStyle" value="lightcontent" />

    <!-- so iPhone and iPad rotate freely (CLI 5.1.1 and above) -->
    <!-- "default" means "portrait" for iPhone and "free" for iPad -->
    <preference name="Orientation" value="all" />

    <preference name="DisallowOverscroll" value="true" />
</platform>

    Crosswalk performance problems are usually due to a lack of the --ignore-gpu-blacklist option in the intelxdk.config.additions.xml file (see above for how to add it). Also, see this blog > Chromium Command-Line Options for Crosswalk Builds with the Intel XDK for some additional tools that can be used to modify Crosswalk webview runtime parameters.

    CLI 4.1.2 included this option automatically. Because there is such a dramatic change to the CLI 5.x build systems, you must now add it manually to make sure it is part of your Crosswalk built app.

    Note, that the current version of App Preview does not use Crosswalk, so your apps will always run slow on Android 4.x devices when you test them in App Preview (or when using the Test tab). Always build a Crosswalk app or use the Debug tab to test your Crosswalk performance. We plan to migrate App Preview to Crosswalk in a future release.

    See the FPS differences in these two screenshots, where the only difference between the builds is the inclusion of the --ignore-gpu-blacklist option.

    Built without the the --ignore-gpu-blacklist option:

    Screenshot_2016-02-22-16-28-16.png

    Built with the the --ignore-gpu-blacklist option:

    Screenshot_2016-02-22-16-29-30.png

    The tests above were done on a Samsung Galaxy Victory (model SPH-L300) phone, running Android 4.1.2 with 805MB total RAM and 1.83GB total storage. This is a slow and memory starved device, with a particularly cranky version of Android 4.x.

    0 Kudos
    Leo_N_Ng_
    New Contributor I
    844 Views

    I'm using CLI 4.1.2 . Is it added  ignore-gpu-blacklist by default. I love to try it. I have been with Intel XDK for almost 2 years. But my games are running very bad on IOS 4S or lower or on cheap Android devices. Especially a big amount of Android devices couldn't play my games, crash after the game started in 1 or 2 minutes. My games are suddenly crashed from low devices. Today I tried to publish my game with Cocoon.io . Unexpectedly, my games worked very smoothly.... no crashes at all on low Android devices. Then I come back to Intel XDK forum to check it out if Intel XDK can improve it. Because building Cocoon takes too long to build 1 application. If you need my game source to test. Please leave me your email for me to send.
    I was using Dragon Touch Y88 bought from Amazon "http://www.amazon.com/Dragon-Touch-Android-Bluetooth-Supported/dp/B015K3APWO/ref=sr_1_2?ie=UTF8&qid=1457835475&sr=8-2&keywords=dragon+touch+y88" to test my games on low devices.

    Thank you so much !
     

     

    <intelxdk:crosswalk xwalk-command-line="--ignore-gpu-blacklist" />

    0 Kudos
    Nhat_N_
    Beginner
    844 Views

    I followed Paul's instructions. But It couldn't help. GPU's raster didn't turn on. I attached the image below.
    Here are my file crosswalk.config.xml after builded as Paul's instruction:

     

    <?xml version='1.0' encoding='UTF-8'?>
    <widget xmlns="http://www.w3.org/ns/widgets" xmlns:intelxdk="http://xdk.intel.com/ns/v1" id="com.cokuma.CatAndDogFighting" version="0.0.4" android-versionCode="40">
    <!--This file is generated by the Intel XDK. Do not edit this file as your edits will be lost.           -->
    <!--To change the contents of this file, see the documentation on the intelxdk.config.additions.xml file.-->
    <intelxdk:version value="1.0"/>
    <intelxdk:cordova-cli version="5.1.1"/>
    <name>Canvas</name>
    <description>Use this template to start with a blank landscape Game</description>
    <author>Intel XDK</author>
    <content src="index.html"/>
    <access origin="*"/>
    <allow-intent href="*"/>
    <intelxdk:plugin intelxdk:name="StatusBar" intelxdk:value="cordova-plugin-statusbar" intelxdk:version="2.0.0" intelxdk:checksum="b92cbbef"/>
    <intelxdk:plugin intelxdk:name="Device" intelxdk:value="cordova-plugin-device" intelxdk:version="1.1.0" intelxdk:checksum="1eae5d64"/>
    <intelxdk:plugin intelxdk:name="Splashscreen" intelxdk:value="cordova-plugin-splashscreen" intelxdk:version="2.1.0" intelxdk:checksum="170efb68"/>
    <intelxdk:plugin intelxdk:name="Cordova Network Whitelist Plugin" intelxdk:value="cordova-plugin-whitelist" intelxdk:version="1.1.0"/>
    <preference name="android-minSdkVersion" value="14"/>
    <preference name="android-targetSdkVersion" value="19"/>
    <preference name="android-installLocation" value="auto"/>
    <preference name="Fullscreen" value="true"/>
    <preference name="Orientation" value="landscape"/>
    <intelxdk:crosswalk version="15"/>
    <!--creationInfo:{"src":"jsapp/template-blank-game-portrait/sample.zip","projectTypeName":"com.intel.xdk.projecttype.jsapp"}-->
    <preference name="debuggable" value="true"/>
    <intelxdk:crosswalk xmlns:intelxdk="http://xdk.intel.com/ns/v1" xwalk-command-line="--disable-pull-to-refresh-effect"/>
    <intelxdk:crosswalk xmlns:intelxdk="http://xdk.intel.com/ns/v1" xwalk-command-line="--ignore-gpu-blacklist"/>
    <intelxdk:crosswalk xmlns:intelxdk="http://xdk.intel.com/ns/v1" xwalk-command-line="--show-fps-counter"/>
    <preference name="CrosswalkAnimatable" value="false"/>
    <platform name="android">
        <!-- below requires the splash screen plugin -->
        <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
        <preference name="SplashScreen" value="screen"/>
        <preference name="AutoHideSplashScreen" value="true"/>
        <preference name="SplashScreenDelay" value="3000"/>
        <preference name="SplashMaintainAspectRatio" value="false"/>
    </platform>
    <platform name="ios">
        <!-- below requires the splash screen plugin -->
        <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
        <!-- <preference name="SplashScreen" value="Default" /> -->
        <preference name="AutoHideSplashScreen" value="true"/>
        <preference name="FadeSplashScreen" value="false"/>
        <preference name="FadeSplashScreenDuration" value="3"/>
        <!-- <preference name="FadeSplashScreenDuration" value="3000"/> -->
        <preference name="ShowSplashScreenSpinner" value="false"/>
    
        <!-- below requires the status bar plugin -->
        <!-- docs: https://github.com/apache/cordova-plugin-statusbar -->
        <!-- see http://devgirl.org/2014/07/31/phonegap-developers-guid -->
        <preference name="StatusBarOverlaysWebView" value="false"/>
        <preference name="StatusBarBackgroundColor" value="#000000"/>
        <preference name="StatusBarStyle" value="lightcontent"/>
    
        <!-- so iPhone and iPad rotate freely (CLI 5.1.1 and above) -->
        <!-- "default" means "portrait" for iPhone and "free" for iPad -->
        <preference name="Orientation" value="all"/>
    
        <preference name="DisallowOverscroll" value="true"/>
    </platform></widget>

     

    0 Kudos
    PaulF_IntelCorp
    Employee
    844 Views
    Leo N Ng. Mar 12

    Hi Paul. I followed your steps on https://software.intel.com/en-us/forums/intel-xdk/topic/607958#comment-1861424
    But it is still crash on my low device using  Cordova Crosswalk 5.1.1. I'm using Samsung Galaxy S3 has no problems. All my published games build with Cordova Crosswalk 4.1.2 couldn't play on low devices, it always crash after 1 or 2 minutes played. Thank you for helps.

    Leo and Nhat -- please try building a version of your app that uses shared-mode Crosswalk, rather than embedded. Then test it on your problem devices (you have to let it download the shared-mode library from the Google Play store). The shared-mode library is CW16, which appears to work better than CW15. The next release will allow you to build with CW16 as an embedded build.

    See the attached image for an example of what I mean.

     

    0 Kudos
    Reply