bruno-roustant commented on PR #13327: URL: https://github.com/apache/lucene/pull/13327#issuecomment-2085548260
Very interesting, I didn't know this history of the FieldInfos. I ended up analyzing the FieldInfos after we saw the time and memory usage for the byNumber array when there are many fields. I think the time comes from the ArrayUtil.grow(byNumberTemp, info.number + 1), when the array has to grow and copy multiple times. For the memory part, it was more a guess since we saw large FieldInfo[] that could be explained if the max info.number was high. But I have no metrics to share unfortunately. If the decision was already taken to stay on a dense array, then I can remove the primitive map from this PR. But I would like to keep the creation and the sorting of the array at the end of the loop, as I think it is faster. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org