Closed crawsible closed 9 years ago
Oh, yeah, absolutely! I'm not very familiar with delayed_job
. Feel free to rewrite that commit if you prefer keeping master
clean.
EDIT: I closed the PR by mistake. Whoops!
Awesome! I'll merge it up then try it out! :)
Hey, HearthStats!
This PR includes both performance and stability improvements to my previous PR, which should continue to improve the Delayed::Job situation. Most notably, I did some research, and found that InnoDB (if your vagrant image is to be believed, your database engine) by default will guarantee you consecutive, incremental ids for data passed in a single INSERT statement, so our assumption is less crazy than we originally thought.
In addition to that that, I also moved the Delayed::Job new match creation logic out of the DJ itself and into the Match model. This is because each instance of a delayed job serializes the struct it is passed and deserializes it upon execution. The less that needs to be serialized and deserialized each DJ run, the faster they'll be.
Hope this helps!
-csj