I have a users collection and I want to compute a score for each user every 15 minutes
for this I'm planned to write a scheduled function to trigger this every 15 minutes
- Loop on all users
- for each user compute new score based on some criteria ... ( very simple mathematical operations ms )
- update the user score field
Question : suppose we have 1 million users so approximately how many time this function can take to process all users ( seconds / minutes ) ? or if there is another way to achieve this to have result ASAP
NOTE : I have Blaze Planad and I'm expecting result should be available ASAP because the goal is to sort users by score every 15 minutes
user collection
- String : id
- String : name
- int : score
- String : email
- List<String> : data
any cloud function example to achieve efficiently this will be appreciated
Thanks