Author Topic: Label text optimization  (Read 5798 times)

justinISO

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 52
    • View Profile
Label text optimization
« on: October 16, 2013, 09:01:33 AM »
I am running into the "too many vertices on one panel" issue, and it is because our client has this long scrolling Terms of Service page he wants in the app that has a large amount of text on it. Is there a way to flatten or optimize this long label so it can work? Or a different method of doing large amounts of text anyone has used?

Thanks,
Justin

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Label text optimization
« Reply #1 on: October 16, 2013, 12:46:48 PM »
Also interested in this. You can of course do pagination, but for some tasks it is not suitable. What are other ways to keep a lot of text?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Label text optimization
« Reply #2 on: October 16, 2013, 01:07:10 PM »
Enable the "Cull" option on the scroll view's UIPanel.

cissyhope

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Label text optimization
« Reply #3 on: December 18, 2013, 10:04:38 PM »
Enable the "Cull" option on the scroll view's UIPanel.
Hi, I have similar problem. We are using the latest version, and I have tried "cull" enabled. It seems that culling is working by widgets. So when I have lots of widgets, some are not visible then it will be culled. But in this case, we only have one UILabel, which is very long with lots of content, part of this label is visible, while lots of other part are not, then it won't be culled. Proof is the vertice number is always 60k, it won't change no matter which part I drag. And UIWidget.UpdateGeometry and UIWidget.WriteToBuffers will cost lots of time which will cause dramatic fps drop.

Can I have solution to this problem or have I missed some important setting or not use it properly?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Label text optimization
« Reply #4 on: December 19, 2013, 12:01:19 PM »
You need to split up your epic label into multiple ones. Consider using paragraphs.

cissyhope

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Label text optimization
« Reply #5 on: December 20, 2013, 12:04:27 AM »
You need to split up your epic label into multiple ones. Consider using paragraphs.
Thanks for your quick reply. Yes, I'm thinking of this as well. Does paragraphs refer to something special here? My plan is to write some code to parse the text and split them into several labels, no automatically way right?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Label text optimization
« Reply #6 on: December 20, 2013, 11:47:35 AM »
Yup, exactly that. UITextList does this too. In fact, you could just use UITextList yourself. Check the chat window example.