Also, your test isn’t “realistic”, since you’re generating 5000 text display objects. That’s more than enough to cripple any app, not to mention being a nightmare to manage/organize. I know this is just a test, but since the time numbers you’re showing are based on a non-real-world use case, perhaps some numbers that are more realistic would help show the difference.
print("textstart",system.getTimer()) for i = 1, 1000 do local t = display.newText( i \* 1000000000000000, 0, 0, native.systemFontBold, 16 ) local t2 = display.newText( i \* 2000000000000000, 0, 0, native.systemFontBold, 16 ) local t3 = display.newText( i \* 3000000000000000, 0, 0, native.systemFontBold, 16 ) local t4 = display.newText( i \* 4000000000000000, 0, 0, native.systemFontBold, 16 ) local t5 = display.newText( i \* 5000000000000000, 0, 0, native.systemFontBold, 16 ) end print("textend",system.getTimer())
i get
textstart 51.117
textend 2675.868
on 1093.
For the tableview, please post a bug report, and we’ll look at it immediately.
I also suffered from poor newText performance and I was creating and destroying many text objects over time in my app. In the end, I reused text objects but only updated their “.text” property as well as their position. This improved performance quite a bit although it was still a bit slow, especially on Android where the text rendering time seems very long. I haven’t tried it with build 1093.
Also, your test isn’t “realistic”, since you’re generating 5000 text display objects. That’s more than enough to cripple any app, not to mention being a nightmare to manage/organize. I know this is just a test, but since the time numbers you’re showing are based on a non-real-world use case, perhaps some numbers that are more realistic would help show the difference.
print("textstart",system.getTimer()) for i = 1, 1000 do local t = display.newText( i \* 1000000000000000, 0, 0, native.systemFontBold, 16 ) local t2 = display.newText( i \* 2000000000000000, 0, 0, native.systemFontBold, 16 ) local t3 = display.newText( i \* 3000000000000000, 0, 0, native.systemFontBold, 16 ) local t4 = display.newText( i \* 4000000000000000, 0, 0, native.systemFontBold, 16 ) local t5 = display.newText( i \* 5000000000000000, 0, 0, native.systemFontBold, 16 ) end print("textend",system.getTimer())
i get
textstart 51.117
textend 2675.868
on 1093.
For the tableview, please post a bug report, and we’ll look at it immediately.
I also suffered from poor newText performance and I was creating and destroying many text objects over time in my app. In the end, I reused text objects but only updated their “.text” property as well as their position. This improved performance quite a bit although it was still a bit slow, especially on Android where the text rendering time seems very long. I haven’t tried it with build 1093.
I’m not aware of any show-stopping performance issues with display.newText(), so you’ll need to explain how you’re using it, and when (in the process of your Runtime), which exhibits the issues.
I’m not aware of any show-stopping performance issues with display.newText(), so you’ll need to explain how you’re using it, and when (in the process of your Runtime), which exhibits the issues.