I usually don’t use the “clean up segments” feature very often, but recently I occasionally start to be bothered by stationary visits where the individual segments view show thousands of little bike/car movements (all within the brown circle). The “clean up segments” feature seems to do a good job condensing it down to a single stationary segment.
My question is, does it have benefits in terms of disk space? Or is it just for aesthetics when looking at the individual segments view?
There’s a deferred “prune samples” task that’s run on all Visit items, when recording is stopped a the app goes into the background. It looks for any excess samples in the Visits recently viewed, to see if they can be deleted.
It will only delete stationary samples, so any samples that have other types assigned (eg walking) it’ll leave untouched. Then it works out which stationary samples it can delete so that there’s at least one sample kept for every 2 minutes.
So if the Visit is full of a mess of different sample types, walking, cycling, car, etc, the sample pruning won’t touch those. But if you do a cleanup so that they’re all now marked as stationary, then all of them are potential candidates for deletion.
So let’s say recording restarted during the visit because the location data was drifting and it looked like maybe you were moving. It’ll keep recording for at least 2 minutes until it goes back to sleep again. That’s potentially a max of 120 samples (one per second). Once those are marked as stationary, the pruning can cut them down to only 1 sample. That’s big disk space savings!
Though in practice that brief wakeup in the middle of a visit wouldn’t record a new sample very second. Indoor location data doesn’t tend to update that frequently. It’d likely be more something like 10-20 samples, then reduced down to 1. But that’s still worth doing.
Another nicety of occasional using the Clean Up button on Visits is that it gives the activity classifiers training feedback. So they’ll get much better at recognising that it should be picking stationary for those samples inside Visits.
After you’ve done a bunch of Clean Ups over a period of time it’ll eventually learn that almost all samples inside Visits to those Places should be marked stationary. So instead of new Visits being full of noisy mess, they’ll often immediately settle down to being 100% stationary samples.
That’s what I tend to see at all my common Places. Home, supermarket, etc. The classifiers have learnt from my previous Clean Up uses that those samples really should just be marked as stationary from the start.
Which then means that the “prune samples” task will be able to clean out a lot of the excess more often, without depending on you tapping Clean Up first. The samples will already be stationary, ready to be purged as appropriate.