cocos2dx 3.17引擎 hello world lua工程运行很慢

使用命令 cocos new HelloWorldLua -l lua -p com.jitongshidai.helloworldlua
创建了一个helloworld工程

用android studio 打包到手机上,运行很慢。LOGO 差不多需要一分钟才能显示。
看了下日志 是加载lua文件导致LOGO 需要等半天才能显示。
NDK版本 r16b


cpu信息:
Processor : ARMv7 Processor rev 0 (v7l)
processor : 0
BogoMIPS : 1592.52

Features : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc09
CPU revision : 0

Chip name : EXYNOS4412
Chip revision : 0020
Hardware : SMDK4x12
Revision : 000b
Serial : 25e59f354df107cb

手机设备信息:
ro.product.model=GT-N7100
ro.product.brand=samsung
ro.product.name=t03gzc
ro.product.device=t03gchn
ro.product.board=smdk4x12
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=samsung
ro.product.locale.language=en
ro.product.locale.region=GB

ro.build.product is obsolete; use ro.product.device

ro.build.product=t03gchn
ro.product_ship=true


gradle.properties文件信息:

Project-wide Gradle settings.

IDE (e.g. Android Studio) users:

Gradle settings configured through the IDE will override

any settings specified in this file.

For more details on how to configure your build environment visit

http://www.gradle.org/docs/current/userguide/build_environment.html

Specifies the JVM arguments used for the daemon process.

The setting is particularly useful for tweaking memory settings.

Default value: -Xmx10248m -XX:MaxPermSize=256m

org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

When configured, Gradle will run in incubating parallel mode.

This option should only be used with decoupled projects. More details, visit

http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects

org.gradle.parallel=true

Android SDK version that will be used as the compile project

PROP_COMPILE_SDK_VERSION=27

Android SDK version that will be used as the earliest version of android this application can run on

PROP_MIN_SDK_VERSION=15

Android SDK version that will be used as the latest version of android this application has been tested on

PROP_TARGET_SDK_VERSION=27

Android Build Tools version that will be used as the compile project

PROP_BUILD_TOOLS_VERSION=27.0.3

List of CPU Archtexture to build that application with

Available architextures (armeabi-v7a | arm64-v8a | x86)

To build for multiple architexture, use the : between them

Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86

PROP_APP_ABI=armeabi-v7a

android native code build type

none, native code will never be compiled.

cmake, native code will be compiled by CMakeLists.txt

ndk-build, native code will be compiled by Android.mk

PROP_BUILD_TYPE=ndk-build

uncomment it and fill in sign information for release mode

#RELEASE_STORE_FILE=file path of keystore
#RELEASE_STORE_PASSWORD=password of keystore
#RELEASE_KEY_ALIAS=alias of key
#RELEASE_KEY_PASSWORD=password of key


说明:在比较老的机型上运行hellowrold 工程 都显示的很慢。
以前老版本的引擎创建出来的helloworld工程 运行都是秒显示的。

1赞

一个开发者为 lua 加载,增加 feature 的 PR 引起的。参考 http://forum.cocos.com/t/cocos2d-x-3-17-android-lua/61285 的讨论,回滚部分代码解决。

1赞