For ENG-5962, based on profiling fix some of the hot code paths