Texture icon indicating copy to clipboard operation
Texture copied to clipboard

tableNode slow operations

Open lsnpatryks opened this issue 8 years ago • 1 comments

I have a tableNode with many sections (most of them contain one element while some of them are bigger). Inserting new element to section (for example first section) is almost as heavy as reloadData (numberOfSections is being called and numberOfRowsInSection for all sections) but also layoutSpecThatFits is called on almost every IndexPath (and this is heavy). That takes almost a second for adding one row into tableNode (with row count around 200) on iPad Pro - which is highly

Is calling layoutSpecThatFits really needed in particular case? Is it possible to cache it somehow? Or maybe I should remove all the sections and try to fit all the rows in one section?

Here is an example: https://gist.github.com/lsnpatryks/e7e08ca9f8d9a142b7767a18365b643c

Table node gets one row inserted each 5 seconds and around 270 layoutSpecThatFits are called (while I think they are not needed).

lsnpatryks avatar Jun 16 '17 13:06 lsnpatryks

I am also facing the same problem, do you have a solution for this?

xdien avatar Sep 07 '23 04:09 xdien