[ https://issues.apache.org/jira/browse/LUCENENET-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Garski updated LUCENENET-315: ------------------------------------- Attachment: LUCENENET-315.patch The attached patch is closer to the implementation of Java's LinkedHashMap than the current implementation, and as such it performs better. The LRU cache uses a LinkedList to maintain LRU state, and a Dictionary to hash into any position in the list. When running long term testing on the current implementation I observed garbage collection issues due to the LRUCacheValueEntry objects being swept from gen 2. To address this issue, the LinkedListNode<ListValueEntry> objects are re-used when items are removed from the cache. Performance Metrics (average of 3 runs) Current Implementation: 100% Miss : 188/sec 100% Hit : 210/sec With Attached Patch: 100% Miss : 201/sec 100% Hit : 210/sec > SimpleLRUCache Implementation > ----------------------------- > > Key: LUCENENET-315 > URL: https://issues.apache.org/jira/browse/LUCENENET-315 > Project: Lucene.Net > Issue Type: Improvement > Reporter: Michael Garski > Attachments: LUCENENET-315.patch > > > The current SimpleLRUCache implementation is a performance hit in the case of > 100% cache misses, which is a common occurrence if search results are cached > externally and only unique queries are executed. > Patch and performance metrics coming shortly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.