high memory usage to get nonshare shortest string