Optimize the share utility method.