Android Tutorial [B4X] BitmapCreator Performance

Edit: Tutorial about BitmapCreator performance: https://www.b4x.com/android/forum/threads/b4x-bitmapcreator-maximizing-performance-with-bc.93907/


I made some tests to better understand the performance of BitmapCreator in the different platforms.

The test starts by creating many boxes with random gradient colors and then it moves all of them each iteration.

SS-2018-05-31_16.43.40.jpg



I looked for the number of boxes where the time it takes to draw all boxes over the main BitmapCreator was less than 15ms.

The results are quite interesting and of course that they depend on the actual hardware used:

B4J - more than 20,000 boxes
B4A (Nexus 5X) - 1,000 boxes
B4i (iPhone 8+) - 20,000 boxes

B4i result is a bit surprising. It is related to the performance improvements done in B4i v5.0.

Note that the boxes are drawn with SkipBlending = True. It will be much slower with blending (blending means that transparent parts and semi-transparent parts of the drawn image are blended with the current pixel color).

Overall the results are quite good.
 

Attachments

  • B4A_BC_Performance.zip
    8.8 KB · Views: 635
  • B4i_BC_Performance.zip
    1.8 KB · Views: 548
  • B4J_BC_Performance.zip
    1.6 KB · Views: 497
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
My test:
B4A (Samsun S6) - 1,000 boxes
B4A (Huawey MediaPad M3) - 1,800 boxes
B4A (Honor 9) - 1,500 boxes

The difference with Iphone seems excessive :confused:
 

sorex

Expert
Licensed User
Longtime User
B4J could use this. I ran that B4J gameview asteroids example a few weeks ago and it ate all my cpu power just to display a few rotating asteroids and a ship :)
 

sorex

Expert
Licensed User
Longtime User
that's what I meant. it's excellent compared to what we had.
 

Star-Dust

Expert
Licensed User
Longtime User
The results are quite interesting and of course that they depend on the actual hardware used:

B4J - more than 20,000 boxes
B4A (Nexus 5X) - 1,000 boxes
B4i (iPhone 8+) - 20,000 boxes

B4i result is a bit surprising. It is related to the performance improvements done in B4i v5.0.

Note that the boxes are drawn with SkipBlending = True. It will be much slower with blending (blending means that transparent parts and semi-transparent parts of the drawn image are blended with the current pixel color).
In my 3D Library the BitmapCreator works well on the B4J, very well on B4A but bad on B4i.
Also I was surprised, I expected better ios.

A heavy 3D object, which b4A runs with 450ms, Iphone also employs 2000ms :confused::confused:
 
Last edited:
D

Deleted member 103

Guest
May be between iPhone 8+ and iPhone 6+ such a big performance difference?
Test in Release-Mode with iPhone 6+, B4i v5.0 and BitmapCreator v3.60.
BitmapCreator_Performance_iPhone_6+_01.jpg
 
D

Deleted member 103

Guest
iPhone 8 was released three years after the iPhone 6. The performance difference can be large.
Then the iPhone X will probably be faster than an iPhone 8+,
but that's why I will not buy an iPhone-x. :p
 
Top