sexytopo icon indicating copy to clipboard operation
sexytopo copied to clipboard

syncTableWithSurvey major performance bottleneck

Open danielworkman opened this issue 3 years ago • 4 comments

syncTableWithSurvey is incredibly slow because it a) creates a TextView object for every row of the table and b) recreates them all every time we call the method. I am seeing this take up to 10 seconds to run per sync event due to these issues.

It should be possible to use a RecyclerView to alleviate some of these issues but more reading is required

danielworkman avatar Jun 09 '21 20:06 danielworkman

Yes, the table activity is horribly inefficient. It's just been well behind all the graph stuff in terms of priority to be looked at. By design you can do almost everything from the graph view though, so in theory you don't need to use it much. It would certainly benefit from some attention.

richsmith avatar Jun 09 '21 22:06 richsmith

Appreciate the work you two are doing on this project at the moment. I'm still hanging out for much more flexible data table workflow and functionality as summarised in #102 (near the end) and linked posts. Not pushing too hard, my Windows devices are still hanging in there, just want to keep it not too far from front of mind...

CaverBruce avatar Jun 10 '21 08:06 CaverBruce

As discussed in the PR, we can also avoid syncing activities that are not currently active.

richsmith avatar Jun 12 '21 08:06 richsmith

This has been improved in the latest version by only updating the open activity (that is, plan, EE, or table) on incoming data.

richsmith avatar Jul 18 '21 08:07 richsmith