Performance Query

When testing an activity posted recently for the Birthday Paradox two people in a group of 30 noticed enough delay in the calculating process to think their screens had frozen.

There are only two screens involved with all the calculation done on the second screen. My question is when does execution occur? Is it only started when someone moves to the second screen or are all screens taken as far as possible at the point of initialisation of the activity? If the former is true, then perhaps performance can be improved by holding students back from the second screen until they have all completed it?

Having experimented with this in the past, a single user on any screen triggers aggregate calculation across the entire activity, regardless of where any other user may be at any time. They don’t even have to be on the screen that’s doing the aggregation, provided their input triggers that function.

Notably, even with just 2 users in total, sometimes across multiple screens the aggregate function can take anywhere from 5 to 30+seconds to update and populate through to everyone. And that’s with just 2 participants.

If you’re relying on really time-sensitive stuff, it’s best to have some kind of activity buffer to allow for that population process to occur.

1 Like

Thanks Mike, of course communication cost is the dominant factor! aggregate is an extremely valuable facility but clearly needs to be used with understanding and care. I’ll remember in future!

I’ve created another version of the activity that aggregates a birthday as a single number rather than separate day and month values, hopefully cutting communication costs significantly.

So, for a class size ‘n’, am I right in assuming that:

  1. aggregate is triggered n times initially with a default birthday value as each student connects.
  2. aggregate is triggered n more times after each student has entered an actual birthday value and clicked their SUBMIT button.
  3. this is a minimum level of communication for each aggregate in any activity.
1 Like

Hi Davy,

I’m running off to school now so I’m forgetting exactly how your Activity worked, but I’m pretty sure your Activity was running 2 aggregates at once - if the Submit action triggers the second aggregate function to run then yes in your case you’ll have 2n aggregates running at the same time.

It would be interesting to know how much running two at once affects processing vs just one. Hmmm