Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - madturtle84

Pages: [1]
1
NGUI 3 Support / Re: DrawCall Rebuild Causing Performance Issue
« on: August 23, 2016, 10:22:48 AM »
Quote
How many widgets do you have per card? You can try having nested panels in there, say one panel per card. Moving panels is very efficient, so you will effectively eliminate all draw call filling altogether.

Thank you ArenMook! The performance is much better now.

Each of my "card" contain 16 widget, so I used to have about 1600 widgets in one panel. After splitting the panel there is no more spike for the FillAllDrawcalls. On my Samsung S3 it runs at around 15 FPS when dragging -- not perfect but acceptable.

By the way, when I was using the "one big panel" method, I noticed the "FillAllDrawcall" function sometime get called even I do nothing. It appear the offscreen widget movement or alpha change also trigger this function. Is it possible to optimize it by checking the isVisible parameter in the "UpdateWidgets()" function? (As shown in the code below at the last line)

Will it have any side effect?

  1. // Copy from UIPanel.UpdateWidgets
  2.  
  3.    if (!mRebuild)
  4.    {
  5.       // Find an existing draw call, if possible
  6.       if (w.drawCall != null) w.drawCall.isDirty = true;
  7.       else FindDrawCall(w);
  8.       // ^- Can we change this line to:
  9.       // else if(w.isVisible) FindDrawCall(w)
  10.    }
  11.  
  12.  

2
NGUI 3 Support / DrawCall Rebuild Causing Performance Issue
« on: August 19, 2016, 04:04:00 PM »
Hello,

I'm working on a ScrollView which has about 100 "Cards" stored in a UIGrid, and each card has a unique UITexture. Right now we hit a big performance issue and the bottleneck seems to be UIPanel.FillAllDrawCalls. Here is what I see after some debugging:

1. When I start dragging, FillAllDrawCalls() is called because FindDrawCall() for off-screen widget return null and set mRebuild to true.

2. When I stop dragging, UpdateSelf()  removes all drawcall for off-screen widget.

As I keep dragging, Step 1 and 2 keeps repeating, therefore there's always a noticable lag at the beginning of the drag. On our targeted Android device FillAllDrawCalls() takes almost 1 second to complete, which make users think it's not draggable. ( Although the performance during drag is okay)

Here is my setting for Scrollview / Panel :


Is there anything I can do to improve the performance?

Pages: [1]