Android Processing Performance

I would like to know what the performances of Sketching in Android looks like. Here is the link for more information about Processing-Android: http://wiki.processing.org/w/Android#Instructions

I do not know at what level processing is in Android and how it is implemented. Therefore, I would like to know what the performance of the processing sketch embedded in the Android application is compared to the usual Android Canvas API.

Processing allows us to create relatively simple programs, and if the performance were good, I’m sure that we could save a lot of time by drawing some of the things in our application using Processing (or, at least for a novice like me, the processing language seems much simpler than Java used in android, as we can easily call the drawing function, etc.)

So, I would like to get your opinion, while thumbnail processing can be as efficient (in terms of performance / optimization) as using the Android Java API directly?

thanks

+6
source share
1 answer

I did some tests with the examples given in the Processing section, and I thought it might be useful for someone ... So, here are the results:

Device: Samsung Galaxy S II: Android 2.3.6, 1 GB RAM, 1.2 GHz dual core Cortex-A9.

Tests (2.0a4 processing)

  • No = too much time for anything (about 5 FPS)
  • Soso = we can see that it is sketching, but there is still a lot of lag (about 10/15 FPS).
  • OK = working (about 25 FPS or more)

The basics:

  • Pointillism = OK
  • Sprite = OK
  • ... most basic examples work correctly

Topic:

Interaction:

  • Follow the examples = OK

Animation:

  • Serial = OK

Effects:

  • Unlimited sprites = OK

Motion:

  • Brownian = OK
  • Bouncy Bubbles = OK

Simulate:

  • Fluid = Soso
  • Flocking = OK (but sometimes FPS is slightly lower, but acceptable)
  • Simple particle system = OK
  • Smoke Particle System = OK
  • Spring = OK
  • Multiple Particle Systems = OK
  • Network = OK

Opengl

  • Birds: without PShape3D = Soso, with PShape3D = OK
  • Earth = OK
  • Rocket = OK
  • Extrusion = NO
  • Electric = OK
  • CameraLight = OK
  • yellowtail = OK
  • Planets = OK

Added libraries:

Fisicia:

  • Bubbles = Soso
  • Litter = Soso
  • Joints = OK
  • Buttons = OK
  • Polygons = OK
  • restitution = OK

PBox 2D: failed to get it working

Some sketches from OpenProcessing.org

Note. I ran all the sketches in their original size, I did not rescale them according to my SGSII (which has a resolution of 480 x 800), so I think that the performance may vary depending on the size of the sketch.

Conclusion: Processing is really interesting as a graphics library for Android. Most of the examples in the Processing section work very well and smoothly on my phone (including OpenGl examples). However, it is not as optimized as on a PC; indeed, a simulation such as Smoke or Vortex, where many particles are involved, is really lagging. The Fisicia library works well on android, which is a really good point.

Voila :)

+10
source

Source: https://habr.com/ru/post/907610/


All Articles