Adobe-Runtime-Support icon indicating copy to clipboard operation
Adobe-Runtime-Support copied to clipboard

ANE context call performance

Open caraiz opened this issue 2 years ago • 4 comments

Im testing performance of call ANE method, and in Android appears some performance degradation, no matter if the method do nothing.

Every call costs a little more time, and after a while it "resets" and starts again with the same behaviour. Its more appreciable if you call more often to the method.

On iOS it works fine, 0 ms no matter the number of calls.

Tested with:

airsdk 33.1.1.92 Samsung Galaxy A5

I attach some screenshots with the total number of calls and the elapsed time of the last call. The method is called every 33ms (30fps)

Image1 Image2 Image3

caraiz avatar Aug 23 '22 08:08 caraiz

That's an odd one.. can you confirm what platform you're using for the ANE (Java or C/C++) - and ideally if you can share your test case it will mean we can get a reproduction quickly and dive straight into debugging..

thanks

ajwfrost avatar Aug 23 '22 09:08 ajwfrost

Its Java, i will try to make a clean test.

caraiz avatar Aug 23 '22 09:08 caraiz

Hi, i send you the code for testing.

The result in my Samsung Galaxy A5 (2016) (Android 7.0) is:

Screenshot_20220823-212617

For example, after 19500 the last call was 22ms, and at 19600 it only 1ms, but starts to increase again, and repeats the same behaviour forever ¿Garbage Collector problem?

AneTest.zip

caraiz avatar Aug 23 '22 19:08 caraiz

I tested in Xiaomi Mi 9T (Android 11) and Galaxy S22 (Android 12), and it works fine, ¿maybe is problem of android version?

Without calling the ANE function the CPU load is around 17%

scout1

Calling the ANE function the CPU load is 100%

scout2

I dont know if with Adobe Scout its possible go depth to know where is the "problem", ¿some ideas?

caraiz avatar Aug 24 '22 20:08 caraiz