• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Stardust particle system Samsung Stage3D performance killer and Adobe Scout bug on Windows

Engaged ,
Mar 26, 2018 Mar 26, 2018

Copy link to clipboard

Copied

Hi guys,

I was debugging my app to try to understand why Stardust particle system is working so bad on Samsung and Android devices in general because it is working great on Desktop and iOS. At first I thought it was because of AS3 but I found out that actually bottleneck is Stage3D which comes as surprise.

What is even more strange is that Stardust is performing the worst on Samsung devices. For example I have tested on Samsung s9 Plus (Exynos version) and Huawei P10 Lite and Huawei P10 Lite has 2x better performance when rendering Starudust particles than latest Samsung s9 Plus device which is way more powerful than Huawei P10 Lite. So that definitely means that there is a issue in code and not in hardware (maybe?).

So I recorded the session with Adobe Scout while particles are playing with Stage3D enabled in the Scout. But I know nothing about Stage3D calls and what calls are expensive and what could be the reason for Stardust particles to perform so badly on Samsung.

In the profile you can see how much more time Stage3D rendering takes up comparing to executing AS3.

Here is the Adobe Scout profile recorded on Samsung device:

https://goo.gl/YngY5G

Also this Scout profile recorded on Samsung device has bug where Adobe Scout crashes if you open Stage3D Rendering tab on Windows 10. Can anyone try it on Mac and select a frame and open the Stage3D tab to see if Adobe Scout crashes on Mac too?

Here are the same particles but played on Desktop PC:

https://goo.gl/d6gep7

And here is the particle system file that I was playing that was created with Stardust Particle System editor:

https://goo.gl/wSv3yk

I am using Stardust Particles from this repo:

https://github.com/matyasf/stardust-library-plumbee/tree/starling_2.0

Is there anyone that have idea why would be there such a difference in Stage3D rendering performance between Samsung and other devices. Is there a way to at least tell if the problem is within AIR or with Stardust Particle System Code?

I am using latest Starling 2.3 and latest AIR SDK 29.

Just as a comparison Stardust Particles will handle 3-4 more particles on iPhone 7 Plus than on Samsung s9 Plus and iPhone X can handle even more like 5-6 times more when comparing with Samsung s9 Plus. So there is a really big difference in performance between Samsung and iOS, PC and even other Android devices when playing Stardust Particles.

Thanks,

Caslav

TOPICS
Development

Views

506

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 26, 2018 Mar 26, 2018

Copy link to clipboard

Copied

I have found what is the reason for this issue. It is VertexBuffer3D.uploadFromVector which seams to be super slow.

Look at the image below:

2018 03 26 3 — imgbb.com

Why is VertexBuffer3D.uploadFromVector so slow on Android. Will refactoring this to VertexBuffer3D.uploadFromByteArray improve the performance?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 27, 2018 Mar 27, 2018

Copy link to clipboard

Copied

LATEST

Starling doesn't optimize it's vertex uploads, that's one of the reasons I don't use Starling, my own engine (and others) can change uploads types statically or dynamically.

Vector: very fast to assemble, very slow to upload

ByteArray: very slow to assemble, very fast to upload

If what you draw has a lot of vertex update to deal with: use vector

If what you draw has very few vertex update to deal with: use bytearray

if you have an intermediate system then upload with Vector and cache with bytearray and as long as data is not changing upload the cached bytearray.

Starling doesn't bother to do any of that. Starling needs a lot of CPU to run correctly and drains batteries like crazy.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines