You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2013/08/23 09:57:51 UTC

[jira] [Commented] (MAVIBOT-11) Add a cache to replace the weakReferences

    [ https://issues.apache.org/jira/browse/MAVIBOT-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13748377#comment-13748377 ] 

Emmanuel Lecharny commented on MAVIBOT-11:
------------------------------------------

Some interesting links :

http://www.codeinstructions.com/2008/09/weakhashmap-is-not-cache-understanding.html
http://en.wikipedia.org/wiki/Cache_algorithms
http://blog.mgm-tp.com/2013/03/garbage-collection-tuning/
                
> Add a cache to replace the weakReferences
> -----------------------------------------
>
>                 Key: MAVIBOT-11
>                 URL: https://issues.apache.org/jira/browse/MAVIBOT-11
>             Project: Mavibot
>          Issue Type: Improvement
>    Affects Versions: 1.0.0-M1
>            Reporter: Emmanuel Lecharny
>            Assignee: Emmanuel Lecharny
>            Priority: Critical
>             Fix For: 1.0.0-M2
>
>
> We currently use a WeakReference to hold elements in memory. This is convenient, but when we have exhausted the memory, the GC takes forever to reclaim the weakReferences, slowing down the code up to a point it's unusable.
> We should rather use a LRU Cache to store a limited amount of elements, and make it configurable.
> We should keep the WeakReferences for those having enough memory. (to be discussed)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira