-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LUCENE-10499: reduce unnecessary copy data overhead when growing array size #786
Conversation
Can we instead add a new method to I don't think we should add a boolean parameter to grow that gives it radically different behavior. |
@rmuir Hi, I add |
@jpountz Hi, can you help to take some time to review this PR, thanks a lot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the change looks correct to me. I'm not a fan of the new method's name, but I don't have a better suggestion. I'll merge this change in a few days unless someone objects.
I don't much like the name either. I wouldn't block, but perhaps |
@jpountz Hi, there are no more reviews for a few days, can you help to merge this pr? thanks. |
…y size (#786) Co-authored-by: xiaoping.wjp <xiaoping.wjp@alibaba-inc.com>
* main: (68 commits) LUCENE-10292: Suggest: Fix FreeTextSuggester so that getCount() returned results consistent with lookup() during concurrent build() LUCENE-10525 Improve WindowsFS emulation to catch invalid file names (apache#829) LUCENE-10508: Use MIN_WIDE_EXTENT for all wide rectangles (apache#845) LUCENE-10470: [Tessellator] Fix some failing polygons due to collinear edges (apache#756) LUCENE-10508: Fix error for rectangles with an extent close to 180 degrees (apache#824) LUCENE-10529: Fix TestTaxonomyFacetAssociations NPE when randomly indexing no documents for dim fix path to jar file in demo documentation LUCENE-10499: reduce unnecessary copy data overhead when growing array size (apache#786) LUCENE-10535: upgrade com.palantir.consistent-versions to 2.10.0 LUCENE-10533: SpellChecker.formGrams is missing bounds check (apache#836) Upgrade spotless and use runToFixMessage for 'gradlew tidy' hint. (apache#834) Fix JVM error branch logic. (apache#835) LUCENE-10493: factor out Viterbi algorithm and share it between kuromoji and nori (apache#805) LUCENE-8836: Speed up TermsEnum#lookupOrd on increasing sequences of ords. (apache#827) LUCENE-10528: use Xvfb in test to avoid messing up user's desktop (apache#828) LUCENE-10315: Speed up DocIdsWriter by ForUtil (apache#797) LUCENE-10517: Improve performance of SortedSetDV faceting by iterating on class types (apache#812) Add two facet tests (apache#826) fail clearly on too-new JDK (apache#819) improve spotless error to suggest running 'gradlew tidy' (apache#817) ...
ArrayUtil#grow
will copy origin array data to the new array after growing size in default, but in many places, the new array needn't the origin data. This PR reduces the extra copy data overhead.Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.