Small wins

I recently moved to a new team within the firm. I was “hired” as an architect/infrastructure designer: this is a team with close to the business and they’re lacking some hard-core technical/technological people. I was a really good match for what they’re trying to achieve. They (and now we) have an old calculation engine that has all the shortcomings from the last decade of software design and development: uses XML heavily, has too many abstractions and it tries to be too smart by allowing too generic things. I’ll be looking into redesigning this while also upgrading the overall architecture of the systems we own. I’ thrilled to do this as I think this is where I want to lead my career.
The first couple of days have been sent with getting familiar with the environment, people and everything. Just out of fun and interest I spawn up a JProfiler and run some huge calcs through the engine. Surprisingly, the top three hotspots were very simple functions – that were called way too many times. One of these was actually just returning the same value 97% of the time, but delegated all the calls back to the parents in the hierarchy. It took about 80 seconds while the calc only used 200 seconds CPU time. It was too apparent that this is the place to start. So I analyzed the code and added some caching where I knew the value can’t change, sparing the huge call chains. I managed to reduce the 80 seconds to around 1-2, dropping CPU usage by 40% for huge calcs (the optimization is not that significant or smaller ones, actually).
When I explained this to more senior people in the team, they were surprised that this was a hotspot – they never imagined it would even come up in a profiling. Then they really like the caching idea. Then the news started to spread, and when I got to talk to the head of the wider team, he already mentioned that he heard that I already cracked the engine and that we’re saving a lot of time :) I explained to him what happened and how it works and that it won’t be reducing time of calcs by 40% as we’re still waiting a lot for IO.
I think this was an easy small win for me: I knew what to do, did it and already made my name heard in the team. I’m not saying people should start playing the cowboy in their new positions, but it’s always worth it to show what you can do iff you have the chance.

Advertisements