Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: cheuksh on December 30, 2013, 01:09:26 PM

Title: vertical scrollview with 1000+ row item
Post by: cheuksh on December 30, 2013, 01:09:26 PM
Is it anyway to do a scrollview with many roll?
With a normal clipping panel, without any alteration, my fps is 10....

Plan A Automatic recycle of scroll item
Plan B Use occlusion culling
Plan C Inactive some of the item according to their postion
Plan D change the background of the sprite from UIsprite to something lightweight, such as simple background color


Plan A require manually recalculate the position of the row on the fly..which is complicated
Plan B tried, wont work.
Plan C....I find that if I set inactive for those row which is outside camera can raise the fps....
Plan D..it seems I cannot apply a background color without applying a UIsprite....

Any suggestion?
Title: Re: vertical scrollview with 1000+ row item
Post by: ArenMook on December 30, 2013, 01:38:56 PM
"A" is the best option. 1000 items is a lot of per-frame calculations and extra baggage that you really don't need.
Title: Re: vertical scrollview with 1000+ row item
Post by: Nicki on December 30, 2013, 07:44:03 PM
A is the only option that will run at all on mobile. It's some work doing the calculations right, but it's totally possible. With A you can make infinite scrollviews too.
Title: Re: vertical scrollview with 1000+ row item
Post by: cheuksh on December 31, 2013, 04:47:56 AM
Thx a lot. Nicki, ArenMook!
I tried Plan A, it work perfectly!
Title: Re: vertical scrollview with 1000+ row item
Post by: emperor1412 on January 07, 2014, 05:16:21 AM
Thx a lot. Nicki, ArenMook!
I tried Plan A, it work perfectly!

That's nice, can you share the code a bit, I'm working on it too   :)