Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Evil-Dog · Jul 18, 2011 at 03:00 PM · cpupresets

How to deal with an insanely high "cpu-present" stats?

Hi there,

I'm currently profiling my game on my android nexus one and I'm getting very high numbers in cpu-present which, if I understand correctly, means that I'm gpu bound. My game consists of a straight road with lots of objects that you have to avoid and they are flat sprites. I know alpha testing/blending can be hard on performance but I'm getting an average cpu-present of 50-60 which is insanely high.

However, before trying to optimize anything, I did some tests and an empty scene with only a few hud elements still gives me an average cpu-present of 30ms, that seems pretty unacceptable. Look at these profiler stats from my Nexus One from a totally empty scene.

 ----------------------------------------
 Android Unity internal profiler stats:
 cpu-player>    min:  2.2   max: 20.5   avg:  6.0
 cpu-ogles-drv> min:  0.2   max:  1.5   avg:  0.4
 cpu-present>   min:  8.2   max: 33.3   avg: 23.0
 frametime>     min: 15.2   max: 42.4   avg: 29.4
 draw-call #>   min:   1    max:   1    avg:   1     | batched:     0
 tris #>        min:     2  max:     2  avg:     2   | batched:     0
 verts #>       min:     4  max:     4  avg:     4   | batched:     0
 player-detail> physx:  0.4 animation:  0.1 culling  0.0 skinning:  0.0 batching:  0.0 render:  2.0 fixed-update-count: 1 .. 2
 mono-scripts>  update:  2.6   fixedUpdate:  0.0 coroutines: 0.2
 mono-memory>   used heap: 4317184 allocated heap: 5033984  max number of collections: 0 collection total duration:  0.0
 ----------------------------------------

I even went further and created an empty unity project and published to my android and I still get avg 15 for cpu-present, is Unity Android still unoptimized? I can't even get 60fps with an EMPTY scene, that's pretty insane.

Furthermore, I get very decent framerates on the iPad 1 and the iPhone 3GS with the same project, absolutly nothing like these profiler numbers.

Does anyone have ideas or pointers to fix that?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Peter G · Jul 18, 2011 at 03:26 PM

Check out this thread.

It pretty much covers everything. And yes it means you are GPU bound more than likely. And that's just a matter of optimizing your graphics. The list is everywhere of what you need to do... reduce drawcalls, batching, avoid transparency where you can. Alpha Blending and Alpha Testing are both costly, but you should lean towards alpha blending when you can.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Evil-Dog · Jul 18, 2011 at 03:40 PM 0
Share

Yeah, I had read that thread already, the problem is I can't avoid transparency as all my objects are sprites ;) One of the thing he suggests is to increase the texture size but I'm already at 1024, making the objects bigger in pixel size just means more materials which means less batching and more drawcalls. I may be asking for the impossible. If I'm not mistaken, without alpha testing, the draw order will not work or it'll hide objects behind even when they're in the transparent part of the object closer to the camera no?

avatar image Evil-Dog · Jul 18, 2011 at 03:47 PM 0
Share

I'm currently checking Jessy's videos, maybe I can optimize the alpha testing/blending, etc http://www.youtube.com/user/JessyUV#p/c/31F6A116DCCC9F61

avatar image Evil-Dog · Jul 18, 2011 at 05:31 PM 0
Share

if you check my edit on the question, you'll see some weird stuff that is pretty much beyond just optimizing the scene or texture...

avatar image Peter G · Jul 19, 2011 at 03:28 PM 0
Share

Well thats interesting... I'm not sure if its an android thing (I dev on iOS). It could just be background tasks.

avatar image Evil-Dog · Jul 19, 2011 at 04:04 PM 0
Share

It's interesting in a "holy crap my project is ruined" kind of way haha background tasks that chop off your first 30fps, just great!

On iOS these numbers are way low even with the full game running

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

unity 3 support multi-core CPU ? 1 Answer

[SOLVED] Which is faster and more efficient? 2 Answers

How many Kinematic rigidbodies(2D) can i have in a device game without any lag ? 0 Answers

Stable Particle: Create particle without particle system [Urgent] 1 Answer

C# Accessing Quality Settings Preset Values 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges