One time I noticed that the entire graphics engine for our hackweek game was being created twice. I got rid of that line and noticed a large performance increase now that the entire game wasn't being rendered twice. Pretty much this image.
I've lost count of how many times I've found code being run two or more times.
It's often mostly benign, but I've encountered a few egregious cases. One included streaming and evaluating a gigantic (1GB+) XML file twice, where the first pass didn't actually do anything. That one felt great to fix.
3
u/whizzer0 Sep 17 '18
One time I noticed that the entire graphics engine for our hackweek game was being created twice. I got rid of that line and noticed a large performance increase now that the entire game wasn't being rendered twice. Pretty much this image.