Again, these are interlinked function and I needed to change the interface to make all work efficiently. In fact, this function, was doing extra string manipulation and snprintf that was expensive. I got rid of those with the specific logic such as assuming the 80% of the object name will be a short name and  < than 176 characters.