Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance problem exploration for UIParticle plugin #193

Closed
Bruce-DC opened this issue Feb 8, 2022 · 5 comments
Closed

Performance problem exploration for UIParticle plugin #193

Bruce-DC opened this issue Feb 8, 2022 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@Bruce-DC
Copy link

Bruce-DC commented Feb 8, 2022

Hello!
After a period of familiarity, we would like to apply your UIParticle plugin to our project to solve the problem of using too many Canvas components for UI particle effects in our project. However, during this time we also discovered a problem: when using THE UIParticle component to manage multiple particle effects in the UI, does it cause performance problems?
We downloaded your demo for research. Here we only compare UIParticle and SortingOrder, so the Hierarchy panel looks like this:
1644309436613-4f901e58-7e7c-43bb-8cf6-f842af1e4aa4
When we used only one UIParticle, the average frame rate was around 550 frames:
1644309586228-2f4be0c7-5e49-4f52-a18c-ccfcc0f80cf5
When we use only one SortingOrder, the average frame rate is around 600 frames:
1644309659997-be743c7a-b2d0-49b5-a34c-32f374198518
It's not a big difference, but let's increase the number to 10.
When showing 10 UIParticles, the average frame rate is 270 frames:
1644309764563-8164c52e-e18f-4976-8f46-191feaf778ff
When we show 10 sortingOrders, the average frame rate is still around 450:
1644309853882-ece7c104-beb3-4929-a751-c413bd95273d

At the same time, we can see that SortingOrder performs better in CPU usage, batch processing and other data.
Because there is a problem in our project that a page uses more than ten Canvas components to control the level of effects, we compare the experiment in this way.
Is it right to draw this conclusion? Or is it unscientific for us to compare?
We look forward to hearing from you.
Thank you very much!

@ifshuaishuai
Copy link

Yes, I also found that UIParticle performance badly, correct me if i am wrong.
So I recommend check out UIParticleSystem.

@midiphony
Copy link

In the README.md, the developer compared its approach with the aforementioned UIParticleSystem.

The issue author should maybe try this other system and compare.

Also, profiler data investigation might be more relevant !

@mob-sakai
Copy link
Owner

Sorry for my late reply.
SortingOrder approach is the fastest and most efficient way to operate.
Its approach works without any extra processes.
However, it requires some canvases with sorting order before and after the particle system.

@mob-sakai
Copy link
Owner

mob-sakai commented Jun 20, 2022

@Bruce-DC @ifshuaishuai @midiphony
Sorry for my late reply.

I test these approaches with a performance-test project.
"Mesh Sharing Group" feature, added in v4.0.0, performs better than "Sorting By Canvas" approach.
PerformanceTest.zip

It displays 300 "flame and spread effect (with Unity-chan)".

NOTE: Below are FPS and stat in Editor (MacOSX). Similar FPS was shown on my iPhone 6s.

Approach FPS on Editor FPS on iPhone6 FPS on Xperia XZ
Particle System 43 57 22
UIParticleSystem 4 3 0 (unmeasurable)
Sorting By Canvas 43 44 18
UIParticle 17 12 4
UIParticle with MeshSharing 44 45 30

Particle System (default)

UIParticleSystem

NOTE: UIParticleSystem does not support trail and texture animation

Sorting By Canvas

UIParticle (v3.3.12)

UIParticle (v4.0.0, without mesh sharing)

UIParticle (v4.0.0, with mesh sharing, 5 groups)

NOTE: The mesh sharing feature improves performance by sharing "particle simulation", "mesh baking", and "mesh combining".

@mob-sakai mob-sakai added the question Further information is requested label Jun 20, 2022
@mob-sakai mob-sakai self-assigned this Jun 20, 2022
@mob-sakai
Copy link
Owner

Since there has been no new discussion for a long time, this issue was closed.

If the same issue arises, please re-open this issue.

@mob-sakai mob-sakai pinned this issue Aug 10, 2022
@mob-sakai mob-sakai unpinned this issue Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants