richsmith / sexytopo

The SexyTopo cave surveying app for Android
GNU General Public License v3.0
30 stars 13 forks source link

syncTableWithSurvey major performance bottleneck #151

Open danielworkman opened 3 years ago

danielworkman commented 3 years ago

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

richsmith commented 3 years ago

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.

CaverBruce commented 3 years ago

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...

richsmith commented 3 years ago

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

richsmith commented 3 years ago

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