google/synthmark

App has lower latency than command line executable

Closed this issue · 1 comments

I ran the SynthMark App latency test on Android device with 6/74 voices. I expected a high latency because it was a changing workload. But I measured a latency of only 6 msec!

But then I built SynthMark using the NDK and ran it as a command line executable.

adb shell synthmark -tl -n5 -N75 -c1

That measured a latency of 112 msec!

I think the difference between the app and the command line may be because:

  1. I am touching the screen when I run the app. That can boost the frequency.
  2. The app has a continuously updated status with a rotating icon. That may increase utilization enough to boost the frequency.

I disabled the ProgressBar that displayed a spinning circle.

// mProgressBarRunning.setVisibility(View.VISIBLE);

Ran with voices: 5/73 and measured 84 and 70 msec.

I completely DISABLED the progressBar updates, including the frame count, and got: 88 msec.
I then ENABLED the ProgressBar and got 8, 2 and 10 msec!
I Then DISABLED the Progress again and got 68 msec.
I then ENABLED the ProgressBar and got 4 msec!

There is a clear correlation. The ProgressBar must go!