Author Topic: vertical scrollview with 1000+ row item  (Read 9969 times)

cheuksh

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
vertical scrollview with 1000+ row item
« 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?
« Last Edit: December 30, 2013, 01:18:46 PM by cheuksh »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: vertical scrollview with 1000+ row item
« Reply #1 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.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: vertical scrollview with 1000+ row item
« Reply #2 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.

cheuksh

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: vertical scrollview with 1000+ row item
« Reply #3 on: December 31, 2013, 04:47:56 AM »
Thx a lot. Nicki, ArenMook!
I tried Plan A, it work perfectly!

emperor1412

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: vertical scrollview with 1000+ row item
« Reply #4 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   :)