mgsx-dev / rainstick

Apache License 2.0
0 stars 0 forks source link

Bad frame rate on poor android devices #4

Open mgsx-dev opened 7 years ago

mgsx-dev commented 7 years ago

about 30 to 45 Fps on all rainsticks except "Big grains" on my Asus tablet.

Have to investigate where are the bottlenecks :

mgsx-dev commented 7 years ago

It appear that pdSend methods takes a lot of time. When rainstick is idle, there are just 3 calls. When I disable them, frame rate get to normal.

I pushed some benchmark tests for both android and desktop and it appear that issue is in engine itself. For instance the sendFloat method take 10 times when calling "kit-freq" than "kit-mixa-dry".

note I benchmarked gdx-pd as well (without audio engine) and time spent in send methods are reasonable, there is some issues with sendList/sendMessage though, see mgsx-dev/gdx-pd#10

Another observation is that Box2D takes lot of time as well specially with polygon shapes, circles give better results.

Global observations, it appear that frame rate issue seams to be caused by a global load :

What I can do to quickly improve things is to avoid jni calls and pd message processing as much as possible :

mgsx-dev commented 7 years ago

Ok I have better results now but I suspect the fill rate now : lot of blending when lot of long living impacts.