So what? - Having 500k Nodes in a flat hirachy implies having 500k Entries in 
the Root nodes 'children' HashMap. Not a big deal in terms of node-hirarchy.

Given you specify a reasonable evictiontimeout, you would not even have to 
store 70% of 500k entries, but only the percentage that is actually being used 
before it times out by eviction. Reasonable means: long enough to keep the data 
in the cache during a regular user session and short enough to free the memory 
as long the data is not being accessed.

Eviction and cacheloading work together: accessing a node that is not in memory 
triggers the cacheloader to load it e.g. from db. not accessing a node (for a 
specified time) makes eviction 'evict' the node. accessing the previously 
evicted node again triggers the cacheloader. Besides the fact that cacheloading 
from db takes some amount of time this process is transparent to the caller 
which is just accessing nodes.

All you have to do is fine-tune eviction to have the amount of data in memory 
tha you actually need.

But I agree that storing a single value in a Hashtable is quite inefficient 
(mosty in terms of number of objects instantiated). From my point of view 
Tree-structure and node's data storage are separate concerns that should be 
defined in separate interfaces. (Which would allow to store arbitrary data 
directly in a node). Maybe this will be in TreeCache in a later release.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3856076#3856076

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3856076


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to