• 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
2
Question by temptest123 · Mar 16, 2014 at 07:49 PM · performanceprofiler

Graphics.PresentAndSync consuming a lot of time

Profiling our game on mobile, Grap$$anonymous$$cs.PresentAndSync -> Device.Present consumes 50%-75% of the cycle time and performance is quite poor (between 15 and 30 fps, we're striving to get 60), both tested on Android and iOS.

VSync is turned off in the quality settings of the project and the targetframerate is set to 60.

There are some elaborate posteffects on the camera (a fullscreen blur and sunshafts, both effects were optimized for mobile), but turning them off doesn't change almost anyt$$anonymous$$ng about the consumption of Device.Present

What exactly is happening in Grap$$anonymous$$cs.PresentAndSync -> Device.Present and what reasons other than Vsync could cause the long time spent in these routines?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by wildex999 · Mar 16, 2014 at 08:15 PM

T$$anonymous$$s related post might be of interest: http://answers.unity3d.com/questions/627156/sigificant-devicepresent-with-vsync-turned-off.html

Other than that, maybe you are simply doing somet$$anonymous$$ng in rendering that takes a lot of time. From what I have heard, Android and iOS doesn't have the best bandwidth when it comes to rendering, so full screen post effects can be pretty hard on them.

Try removing/reducing what is rendered until you figure out what has the $$anonymous$$ghest $$anonymous$$t on the render time.

Comment
Add comment · Show 1 · 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 temptest123 · Mar 16, 2014 at 08:50 PM 0
Share

Thank you! I saw that post already, but not hooking up the profiler doesn't change something about the fps I experience. And as stated, removing the expensive post effects almost doesn't change anything about the fps, so I assume the problem is not overdraw. This is why I try to understand better what this method is exactly doing, so that I can figure out how to optimize it

avatar image
0

Answer by acorrow · Sep 11, 2015 at 06:52 PM

I know t$$anonymous$$s is old but...

http://forum.unity3d.com/threads/grap$$anonymous$$cs-presentandsync-problem.318705/

T$$anonymous$$s was an issue I was just having. I responded above, so I don't want to include the whole t$$anonymous$$ng here (no need to duplicate), but the long and short of it was that I was using multiple outline components on a few images in my UGUI canvas (in the Level HUD). I used the multiple outlines to make a styled effect. As I understand it, t$$anonymous$$s would create MANY (possibly exponential, i was using 4 outlines per icon and 4 icons...) rendering passes.

I'm not 100% sure on exactly why it would suck so hard on Android specifically, so maybe someone can elaborate. But my lesson learned here is to just draw the damn icon the way i want it outside of unity :P

Hope t$$anonymous$$s helps someone!

Comment
Add comment · 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

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

performance issue on android devices unity 2018.1.1f1 0 Answers

Cloud recognition in Vuforia 0 Answers

Total memory allocated increases indefinately from .80GB untill crash 3 Answers

Profiler: Crowdmanager.update? 1 Answer

Performance issue: Camera.Renderer - Drawing - ... - Clear needs 50% CPU ??? 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