Watch face: how to get activities from the last seven days

Hey all,

I'm trying to get activities from the last 7 days. Is there an efficient way to do this?

Right now, in the onUpdate method, I'm doing the following:

var userActivityIterator = UserProfile.getUserActivityHistory();
var nextActivity = userActivityIterator.next();
while (nextActivity != null) {
    var startTime = nextActivity.startTime;
    // check if start time is in last 7 days
    nextActivity = userActivityIterator.next();
}

My concern is that this loops through all the user's activities, which seems like a lot of processing for an onUpdate function.

I have it all working, but I'm worried it will kill the battery life. Wondering if there is a better way to do this.

For context, I'm creating a watch face that will show the running mileage for your last 7 days (as opposed to this week like the complication offered by Garmin).

Appreciate any help! Thanks!