← Back to context

Comment by olvy0

3 years ago

This sounds like my dream job, actually.

It's what I do at work for fun, in between my "real" development / support tasks. I profile and optimize our internal application, its loading time, user interactions, etc.

Sometimes when it's a long term I make a proof of concept and ask for permissions later, so for a while optimization becomes my actual job. Just finished a couple of months of performance tuning, actually, which I did in parallel to other tasks.

TBH there are plenty of easy, low hanging fruits since the team who wrote it wouldn't recognize a performant code if it smacked them in the face. Or they concentrated on very minor optimizations in rarely executed parts of the code and tended to bikeshed them for hours instead of actually checking what the real problems were.

I actually almost never use an actual profiler when starting, I just run under the debugger and pause the application at random instances when it appears to be stuck.

In almost all cases I find it's executing some unnecessary batch of queries, or reading from a table using an unindexed column, or redrawing parts of the screen which shouldn't be updated, or throwing and catching exceptions that were used instead of if statements, or blocked when it could run in parallel to some other computation, or doing some other unnecessary O(n^2) loops instead of using a hash table. A combination of such improvements will sometimes gain up to 20%-40% speed or even more.

When I'm done with these simple cases I start using a profiler for the that extra optimizations for those extra percentages.

Agreed about the dream job, that's pretty much what i explicitly answer every time i am asked about my preferences in terms of stack/tech to recruiters and engineers i interviewed with. I lucked-in into such a situation at least once, and I can confirm that I still enjoy it.

I can definitely see why some people might hate that situation, because it feels like nothing is working and you dont know anything at first. But if you aren't demoralized by that, and instead find joy in learning/figuring out all those new things on a regular basis, it all feels extremely rewarding. Like, why would I dislike being paid to essentially learn a bunch of new stuff regularly and solve actual real world impact problems using that new knowledge.