Purpose of the sleep(.2) in the loyalty mod #44
-
Hi! I've been studying your code and have interest in how the loyalty/point system works in it. I'm curious what the point of the From my understanding this would result in processing only 300 users per 60 seconds. If your channel had more than 300 chatters, it wouldn't finish processing that batch of users by the time the next loyalty_interval is triggered. Just curious why you had to include this sleep instead or processing them as fast as possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
because disk IO is one of the bigger bottlenecks with any code, i added this in the case that there is a lot of users to process. (to be sure no important async operations are suspended for long) however thinking about it now, it is a excessive delay, and probably not even needed due to the commit=False. |
Beta Was this translation helpful? Give feedback.
because disk IO is one of the bigger bottlenecks with any code, i added this in the case that there is a lot of users to process. (to be sure no important async operations are suspended for long)
however thinking about it now, it is a excessive delay, and probably not even needed due to the commit=False.
i will likely remove this