This is an automated email from the ASF dual-hosted git repository.
nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 65e0d392e9613be5649cfb7bd572f78e05bf0e85
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Sat Jul 18 02:30:37 2020 +0700
PERFORMANCE: Lucene.Net.Analysis.CachingTokenFilter: Changed cache from LinkedList to List
---
src/Lucene.Net/Analysis/CachingTokenFilter.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Lucene.Net/Analysis/CachingTokenFilter.cs b/src/Lucene.Net/Analysis/CachingTokenFilter.cs
index 7fed679..aa3bb85 100644
--- a/src/Lucene.Net/Analysis/CachingTokenFilter.cs
+++ b/src/Lucene.Net/Analysis/CachingTokenFilter.cs
@@ -32,7 +32,7 @@ namespace Lucene.Net.Analysis
/// </summary>
public sealed class CachingTokenFilter : TokenFilter
{
- private LinkedList<AttributeSource.State> cache = null;
+ private IList<AttributeSource.State> cache = null;
private IEnumerator<AttributeSource.State> iterator = null;
private AttributeSource.State finalState;
@@ -51,7 +51,7 @@ namespace Lucene.Net.Analysis
if (cache == null)
{
// fill cache lazily
- cache = new LinkedList<AttributeSource.State>();
+ cache = new List<AttributeSource.State>();
FillCache();
iterator = cache.GetEnumerator();
}
@@ -93,7 +93,7 @@ namespace Lucene.Net.Analysis
{
while (m_input.IncrementToken())
{
- cache.AddLast(CaptureState());
+ cache.Add(CaptureState());
}
// capture final state
m_input.End();