Migrate linked list to more efficient datastructre#15704
Migrate linked list to more efficient datastructre#15704uschindler merged 7 commits intoapache:mainfrom
Conversation
# Conflicts: # lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.java
|
Hi @uschindler |
|
@uschindler Could you please have a look at my changes, thanks |
|
Sorry for the delay, had a surgery and missed the remineder. |
...lysis/common/src/java/org/apache/lucene/analysis/synonym/word2vec/Word2VecSynonymFilter.java
Show resolved
Hide resolved
...sis/common/src/java/org/apache/lucene/analysis/synonym/word2vec/Word2VecSynonymProvider.java
Show resolved
Hide resolved
| } | ||
| return accept; | ||
| } | ||
|
|
There was a problem hiding this comment.
thanks for removing this :-)
lucene/core/src/java/org/apache/lucene/analysis/AutomatonToTokenStream.java
Show resolved
Hide resolved
|
|
||
| /** | ||
| * FieldPhraseList has a list of WeightedPhraseInfo that is used by FragListBuilder to create a | ||
| * FieldFragList object. |
There was a problem hiding this comment.
should possible be marked @lucene.experimental
That's fine. Commented out code over several pages is bad habit before you had version control. If you want to remove code remove it, the history is still available in case something performs not good. |
I've replaced almost all LinkedList with an ArrayDeque or an ArrayList.
If elements are added/remove at the beginning or at the end, I replaced it with an ArrayDeque. If elements are accessed by index, I removed it with an ArrayList.
In rare cases, where it was use as a List and as a Queue, I left the LinkedList untouched.
I also took the liberty to do some small improvements and have removed some all commented out code. Please let me know it that is fine.