Author Topic: UIPanel.LateUpdate performance  (Read 8161 times)

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
UIPanel.LateUpdate performance
« on: August 14, 2012, 08:36:34 AM »
Following your advice to put everything that should move in a separate UIPanel, I still have some slow behavior.

When I click a button, this will move down a UIPanel (with a lot of elements on it) and move up another one. And in the profiler I see that UIPanel.LateUpdate() takes 100ms to complete.

Didn't you said that this should be super fast because we just move the UIPanel ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIPanel.LateUpdate performance
« Reply #1 on: August 14, 2012, 03:14:04 PM »
Yes it should. Moving panels has almost no cost associated with it. Sounds like something is still happening that shouldn't. You are moving the actual UIPanel, not its child, right? Try putting a Debug.Log in the UIPanel's UpdateTransforms function, after "if (node.HasChanged())" to determine what is still changing.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: UIPanel.LateUpdate performance
« Reply #2 on: August 16, 2012, 05:17:02 AM »
I'm using a UIPanel with a draggable panel script on it.

I've tried to put logs in the method you said, well absolutely nothing logs (after init of course) when I'm not scrolling, and when I'm scrolling, only 2-3 widgets are updated from time to time.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIPanel.LateUpdate performance
« Reply #3 on: August 16, 2012, 10:19:44 AM »
Well, this suggests that your issue is not in the draggable panel. Try deep profiling and see if you can figure out what's really eating up so much time.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: UIPanel.LateUpdate performance
« Reply #4 on: August 16, 2012, 02:27:04 PM »
As explained in the email... I don't know what it is :(