Hi Pritam,

I had a similar problem in one of my projects and we solved it by
making the tree AJAX aware - which means that we only loaded the first
section of the tree with the site and then loaded other sections on
demand if a user clicked the related "+".

However, if that is not possible for you, you have 2 other options: 1)
use a different tree component from another library (not tomahawk) or
2) write your own tree component.

I hope this helps!

Regards,
Jakob

2011/3/1, Gaikwad, Pritam (Pritam) <[email protected]>:
> Hi,
>
>
>
> We are using tomahawk's tree2 component in our application. We have more
> than 12000 nodes in the navigation tree which is the most important
> component of our application.
>
>
>
> The problem is- with 12000 nodes tree renderer generates large amount of
> html (~ 20MB) which is repetitive and   the browser takes almost 40-45
> minutes to render the tree. So, do we have any way to avoid this
> problem?
>
>
>
> Mentioned below html  is only a small part of what's being sent from the
> server.
>
> <table cellpadding="0" cellspacing="0" border="0"><tr><td width="19"
> height="100%" nowrap="nowrap"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/line-trunk.gif"><img
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> line-trunk.gif" alt="" width="19" height="18" border="0" /></td><td
> width="19" nowrap="nowrap" height="100%" valign="top"><a href="#"
> onclick="setID(this.id);;return
> oamSubmitForm('navigation:_idJsp1','navigation:_idJsp1:enterprise:enterp
> rise-tree:enterprisetree:0:0:0:t2g',null,[['enterprisetree:org.apache.my
> faces.tree.NAV_COMMAND','0:0:0']]);"
> id="navigation:_idJsp1:enterprise:enterprise-tree:enterprisetree:0:0:0:t
> 2g"><img
> id="navigation:_idJsp1:enterprise:enterprise-tree:enterprisetree:0:0:0:t
> 2"
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> nav-minus-line-last.gif" alt="Collapse" border="0" height="18"
> width="19" title="Collapse" /></a></td><td nowrap="nowrap"><span
> style="white-space:nowrap;"><img
> src="/CS-OAM/images/dtree/folderopen.gif" alt="Folder Open" border="0"
> /><a href="#" onclick="setID(this.id);return
> oamSubmitForm('navigation:_idJsp1','navigation:_idJsp1:enterprise:enterp
> rise-tree:enterprisetree:0:0:0:_idJsp35');"
> id="navigation:_idJsp1:enterprise:enterprise-tree:enterprisetree:0:0:0:_
> idJsp35" class="document">Default Admin
> Site</a></span></td></tr></table>
> <table cellpadding="0" cellspacing="0" border="0"><tr><td width="19"
> height="100%" nowrap="nowrap"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/line-trunk.gif"><img
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> line-trunk.gif" alt="" width="19" height="18" border="0" /></td><td
> width="19" height="100%" nowrap="nowrap"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/spacer.gif"><img
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> spacer.gif" alt="" width="19" height="18" border="0" /></td><td
> width="19" nowrap="nowrap" height="100%" valign="top"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/line-trunk.gif"><img id="t2"
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> line-middle.gif" alt="" border="0" height="18" width="19" /></td><td
> nowrap="nowrap"><span style="white-space:nowrap;"><a href="#"
> onclick="setID(this.id);return
> oamSubmitForm('navigation:_idJsp1','navigation:_idJsp1:enterprise:enterp
> rise-tree:enterprisetree:0:0:0:0:_idJsp38');"
> id="navigation:_idJsp1:enterprise:enterprise-tree:enterprisetree:0:0:0:0
> :_idJsp38" class="document">mhprfadmin</a></span></td></tr></table>
> <table cellpadding="0" cellspacing="0" border="0"><tr><td width="19"
> height="100%" nowrap="nowrap"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/line-trunk.gif"><img
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> line-trunk.gif" alt="" width="19" height="18" border="0" /></td><td
> width="19" height="100%" nowrap="nowrap"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/spacer.gif"><img
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> spacer.gif" alt="" width="19" height="18" border="0" /></td><td
> width="19" nowrap="nowrap" height="100%" valign="top"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/line-trunk.gif"><img id="t2"
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> line-middle.gif" alt="" border="0" height="18" width="19" /></td><td
> nowrap="nowrap"><span style="white-space:nowrap;"><a href="#"
> onclick="setID(this.id);return
> oamSubmitForm('navigation:_idJsp1','navigation:_idJsp1:enterprise:enterp
> rise-tree:enterprisetree:0:0:0:1:_idJsp38');"
> id="navigation:_idJsp1:enterprise:enterprise-tree:enterprisetree:0:0:0:1
> :_idJsp38" class="document">mhprfdb2</a></span></td></tr></table>
> <table cellpadding="0" cellspacing="0" border="0"><tr><td width="19"
> height="100%" nowrap="nowrap"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/line-trunk.gif"><img
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> line-trunk.gif" alt="" width="19" height="18" border="0" /></td><td
> width="19" height="100%" nowrap="nowrap"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/spacer.gif"><img
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> spacer.gif" alt="" width="19" height="18" border="0" /></td><td
> width="19" nowrap="nowrap" height="100%" valign="top"
> background="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.re
> nderkit.html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/
> images/line-trunk.gif"><img id="t2"
> src="/CS-OAM/faces/myFacesExtensionResource/org.apache.myfaces.renderkit
> .html.util.MyFacesResourceLoader/12986260/tree2.HtmlTreeRenderer/images/
> line-middle.gif" alt="" border="0" height="18" width="19" /></td><td
> nowrap="nowrap"><span style="white-space:nowrap;"><a href="#"
> onclick="setID(this.id);return
> oamSubmitForm('navigation:_idJsp1','navigation:_idJsp1:enterprise:enterp
> rise-tree:enterprisetree:0:0:0:2:_idJsp38');"
> id="navigation:_idJsp1:enterprise:enterprise-tree:enterprisetree:0:0:0:2
> :_idJsp38" class="document">mhprfdc1</a></span></td></tr></table>
>
>
>
> Regards,
>
>
>
> Pritam
>
>
>


-- 
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at

Reply via email to