Hm...Ok I see the benefit of your implementation I will definitely give it
a try this weekend

Thanks

On Thu, Jun 20, 2013 at 3:16 AM, Lance Java <lance.j...@googlemail.com>wrote:

> Yes, that's exactly why I created the LazyTreeModel.
>
> The DefaultTreeModel works best when the entire model is loaded into memory
> and the model is stored between requests (in the session or as a
> singleton). The first time a node is expanded, it must be found by
> traversing from the root which has complexity O(N). Subsequent expansions
> of the same node have complexity O(1) since a hash lookup in a cache is
> done.
>
> In contrast, the LazyTreeModel has complexity of O(1) without needing to be
> stored between requests. For this reason, I feel it is more scalable since
> you never store the entire tree in memory.
>



-- 
Sincerely
*Boris Horvat*

Reply via email to