[ https://issues.apache.org/jira/browse/COUCHDB-913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923745#action_12923745 ] Adam Kocoloski commented on COUCHDB-913: ---------------------------------------- Hi Filipe, I read through the term_cache_trees code and the patches to couch. I have a couple of comments: 1) The free_cache_entry code could save one get call by using take_smallest/1 and take_largest/1 instead of smallest/1 and largest/1 on the access time tree, right? 2) Similarly, I think you could skip the gb_trees:delete(Key, Items) call in the put handler and use gb_trees:enter instead of insert at the end of the handler. 3) Unless I'm missing something I believe you're leaking a cache process during DB and view group compaction. A new_btree_cache() is created during couch_db_updater:init_db() and couch_view_group:reset_group(), but the old cache is not destroyed when either compaction finishes. Cheers, Adam > Caching of BTree nodes and documents > ------------------------------------ > > Key: COUCHDB-913 > URL: https://issues.apache.org/jira/browse/COUCHDB-913 > Project: CouchDB > Issue Type: Improvement > Reporter: Filipe Manana > Assignee: Filipe Manana > > The following patch adds optional caching of BTree nodes (for both DBs and view indexes) and documents: > http://github.com/fdmanana/couchdb/commit/c6361d1e0d86942fc86350bea9ca1e8d7539c1b3 > Look at the new parameters introduced in default.ini.tpl.in for more details. > This is based on the work initially done by Randall Leeds, found at: > http://github.com/tilgovi/couchdb/commits/forevercache > I'll not commit it before 1.1 nor without any feedback. > cheers -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.