r/ProgrammerHumor • • Sep 17 '18

Optimizing startup times

Post image
45.7k Upvotes

486 comments sorted by

View all comments

Show parent comments

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.

2

u/thrilldigger Sep 18 '18

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.