Race of library slow when Alchemy app disabled in the Release version

Hello

I'm working on an application that an operation running through a library of Alchemy (written in C and exposed as .as) long.

Here are the high-level logic to illustrate the idea:

QNXSystem.system.inactivePowerMode = QNXSystemPowerMode.NORMAL;

addEventListener (AlchemyLibraryEvent.PROGRESS, onProgress);

addEventListener (AlchemyLibraryEvent.COMPLETE, onComplete);

Call the library of Alchemy;

private void onProgress(event: AlchemyLibraryEvent) {}

update of the progress made in the user interface;

}

private void onComplete(event: AlchemyLibraryEvent) {}

QNXSystem.system.inactivePowerMode = QNXSystemPowerMode.STANDBY;

If app is in {disabled state

QNXSystem.system.powerMode = QNXSystemPowerMode.STANDBY;

}

}

In the bar-descriptor:

run_when_backgrounded

What happens is that the app works perfectly well (no matter the app is active, put off the power, the unit standby) in a debug build (by token of debugging).  However, when it is exported as a signed bar and running on the same physical device BB10, it normally only works when the application is active.  Whenever the application is disabled (when the screen is off, or app pushed back and another application is brought to the foreground), the application runs always, but at a very slow speed (about 1/15 of the original speed).

I did some debugging and confirmed that when the application is disabled, she was continuing with NORMAL power at the rate of 60 frames per second, which seems to be quite normal.  What I don't understand is why the chemistry library runs a lot slower in the background in the Release version.

As a proof of concept, I added the following code just before inactivePowerMode to NORMAL:

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

The build version will run at normal speed and the screen turn off.  However, if I press the device power button, or push the app thoroughly (and make another application in the foreground), he repeats the same behavior running slowly.

Any ideas would be much appreciated!

No, there is no way to take more CPU power when in the background. The operating system applies this to the user, so they have no apps churning through their battery on them. I would recommend that you inform users of this, so they can decide what they want to do. BlackBerry 10 is expected for the multitasking well, so I expect that they will enjoy and put the application in the background.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for