Shinobi Grid lags while scrolling to row



I have very bad performance with a grid that has about 200 rows. When i want to scroll to a specific row e.g. no.180 by setting ContentOffset to the calculated position the main thread hangs about 6 sec. While debugging I found out that GetCell(ShinobiGrid grid, SGridCoord gridCoord) is called for every row above 180. Is there a way to avoid this issue.


Hi Maic,

The poor performance you are seeing is a result of our framework not distinguishing bewteen animated and non-animated changes to contentOffset. Both change types are treated as animated, meaning that the grid ensures all rows appear as part of the offset change. We do plan on addressing this issue in a future release.

In the meantime, 6 seconds for 200 rows seems much longer than I would expect even with the issue I have described above. You may be able to improve performance by optimising your GetCell method. Some of the things you can look at doing are:

  • ensuring that you are creating as few objects as possible in your GetCell method
  • avoiding computationally expensive work in the GetCell method
  • avoiding manipulating the view hierarchy (such as methods like setting the frame or adding/inserting subviews)

I hope the above suggestions help reduce the lag you are seeing! Please don’t hesitate to contact us if there’s any further info we can provide.