----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61986/#review184123 -----------------------------------------------------------
Fix it, then Ship it! Please make sure you don't accidentally create a new CPU performance problem, see below. sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/PathImageRetriever.java Lines 83 (patched) <https://reviews.apache.org/r/61986/#comment260190> This StringUtils.countMatches() that looks for a substring, rather than a single char, may potentially be rather slow. It's one thing to go through all the characters in a string once, and perform == check for each. But it may be an order of magnitude slower to repeatedly perform a search for substring (unless this is specially optimized). So I highly recommend to check the source code of StringUtils.countMatches(), and maybe search for / implement your own countMatches(String haystack, char needle) - Misha Dmitriev On Aug. 30, 2017, 4:59 a.m., Alexander Kolbasov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61986/ > ----------------------------------------------------------- > > (Updated Aug. 30, 2017, 4:59 a.m.) > > > Review request for sentry, Arjun Mishra, Brian Towles, Misha Dmitriev, Na Li, > Sergio Pena, Vamsee Yarlagadda, and Vadim Spector. > > > Bugs: SENTRY-1907 > https://issues.apache.org/jira/browse/SENTRY-1907 > > > Repository: sentry > > > Description > ------- > > SENTRY-1907 Potential memory optimization when handling big full snapshots. > > > Diffs > ----- > > > sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/PathImageRetriever.java > f1e67ca6e343e4e5dd0c3377c4c6beb19544e3eb > > > Diff: https://reviews.apache.org/r/61986/diff/1/ > > > Testing > ------- > > > Thanks, > > Alexander Kolbasov > >
