tableView onRowRender sluggish with images

So I am not sure if I am doing all wrong, please correct me if that’s the case by telling me where I should place the code exactly.

I am adding 3 images on every row (display.newImage). It’s working very well. The only issue is the scrolling is not fluid. Why is that? Are the images being redrawn every time a part of the table is out of view? How can I avoid that?

Am I using the wrong control? Basically it’s an image grid.

Please advice. Thanks.

I believe that when the tableView is first created, it creates all of the rows that are on screen plus 2 or 3 extra rows that are offscreen. Then as you scroll down, the additional rows are created, as needed. Some of the rows, that have scrolled off of the screen are removed from memory and have to be recreated when you scroll back up.

You can verify if this is really happening by placing a print statement in your onRowRender function and printing out the row number.

This was an enhancement in widget2.0. In widgets1.0, the tableView created the entire table on startup, but this could lead to a large amount of memory being used based on the size of the table and the contents of each row. 

I can think of 2 possible ways to address this. First, make sure your onRowRender code is optimized. If you’re still having a problem, use the open source version of widgets2.0 and modify the behavior of the tableView.

You should also check out if your images are actually not expanding row width, this used to be a problem 3-4 months ago

I believe that when the tableView is first created, it creates all of the rows that are on screen plus 2 or 3 extra rows that are offscreen. Then as you scroll down, the additional rows are created, as needed. Some of the rows, that have scrolled off of the screen are removed from memory and have to be recreated when you scroll back up.

You can verify if this is really happening by placing a print statement in your onRowRender function and printing out the row number.

This was an enhancement in widget2.0. In widgets1.0, the tableView created the entire table on startup, but this could lead to a large amount of memory being used based on the size of the table and the contents of each row. 

I can think of 2 possible ways to address this. First, make sure your onRowRender code is optimized. If you’re still having a problem, use the open source version of widgets2.0 and modify the behavior of the tableView.

You should also check out if your images are actually not expanding row width, this used to be a problem 3-4 months ago