Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimize tableView insertion in CoronaSDK

Tags:

lua

coronasdk

This code takes two seconds to process.

print("before loop scholarships:"..system.getTimer())
for i = 1, scholarshipTableSize  do

-- Insert the row into the tableView
tableView:insertRow
{
    isCategory = false,
    rowHeight = 75,
    rowColor =      
    { 
        default = { 255, 232, 4 },
        over = { 0, 158, 255 },
    },
    lineColor = { 0, 0, 0 },
}
end

scholarshipTableSize is somewhere around 1200. How can I optimize this insertion so that it performs faster?

like image 798
Eyeball Avatar asked Mar 08 '26 03:03

Eyeball


1 Answers

After I updated to the latest corona build, the time was much better. around 2 ms.

Now I am using build 2013.1137

like image 149
Eyeball Avatar answered Mar 10 '26 18:03

Eyeball



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!