Open argoneuscze opened 6 years ago
I'm not sure why you're now deep copying all the dictionaries.
The asynchronous code works within the same thread, there's just some overhead for the event loop, but you don't need to copy anything, as it can't be written from multiple places. There are cases where you mix asynchronous + threads, but this isn't one of them.
Originally posted by @argoneuscze in https://github.com/AttorneyOnlineVidya/tsuserver3/issues/21#issuecomment-431691387
Is it necessary to update the stats every
secondminute? I feel it should be enough to do it every half an hour or so, if even that.And if it's needed more often, I'd suggest switching to an actual database, e.g. sqlite3 is supported by python out of the box.