Maneesh,
I think, you are asking more on code optimization than customisation (title says, customisation).
In my opinion, to optimize, we need to first understand the scope of optimization and where/what to optimize. There are tools available to help us.
Apart from the tools indicating the optimization scope, following standard coding practices and design principles would also direct us towards it.