3 ms·
> this.ongoingPolls.set(hnUsername, displayToken); Instead of creating a timer + poll loop per user on your server, why not use one single scheduled job and an
by gavinray 5y ago
> this.ongoingPolls.set(hnUsername, displayToken);
Instead of creating a timer + poll loop per user on your server, why not use one single scheduled job and an array of usernames?
Seems like debugging +10,000 interval timers could get hairy
- hardwaresofton 5y agoYou're right, that would be way more efficient -- it actually wasn't a huge problem, so I never found the need to combine them. So far we've had 700+ people log in (probably more after this post hit front page, I need to check), and so far it hasn't been a huge issue.