-
-
Notifications
You must be signed in to change notification settings - Fork 168
Profiling
Your app is running slow or allocates ton's on memory, well it's time to profile it!
You can use chrome's developer tools to profile your application
- More information here: https://developer.chrome.com/devtools.
- Get it here: http://hxscout.com, it's free and doesn't even need registration!
Make sure port 7934 is open and unused (f.ex. you can't run both Scout and hxScout next to each other).
Install the https://github.com/jcward/hxtelemetry library
haxelib install hxtelemetry
Edit your khafile.js to include hxtelemetry.
project.addLibrary('hxtelemetry');
project.addCDefine('HXCPP_TELEMETRY');
project.addCDefine('HXCPP_STACK_TRACE');
And edit your application's sourcecode to initialize hxtelemetry.
class Main {
static var hxt = new hxtelemetry.HxTelemetry();
public static function main() {
kha.System.init(..., system_initializedHandler);
}
static function system_initializedHandler() {
kha.Scheduler.addFrameTask(hxt.advance_frame.bind(null), 0);
}
}
Start hxScout, then start your application and have fun! Documentation on how to use hxScout is available on the net:
- Get it here if you already use Create Cloud: https://www.adobe.com/products/scout.html, it's free but requires registration on the Adobe site
- Get it here as direct download without registration: http://prodesigntools.com/adobe-cc-2018-direct-download-links.html
Make sure port 7934 is open and unused. For basic instrumentation (Framerate, cpu usage, ...) no further setup is required. For more advanced instrumentation (Memory (de)allocation, Stage3d captures) edit your khafile.js.
project.addDefine('advanced-telemetry');
Just start Scout, then start your swf and have fun! Documentation on how to use scout is available on the net:
- Introduction
- Getting Started
- Breaking Changes
- FAQ
- System targets
- Graphics targets
- Documentation
- API package descriptions