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.

Reply via email to