Getting the structure of a SharePoint site without using SPWeb objects
I am working with a web part that needs to show the structure of a site. Normally when I have needed to do this in the past I would just parse through the SPWeb objects. However this is not exactly a good solution from a performance perspective, and when the web part is going to be used on a public facing web site I’m not keen to bring the web service to a halt every time the site structure is generated for this web part.
I put the question out to some colleagues of mine, and Hristo Pavlov came up with an awesome solution that uses some unmanaged calls and reflection to get all the data you need. Check out his blog post at http://hristopavlov.wordpress.com/2008/10/20/a-very-fast-method-to-get-the-site-collections-web-structure/.



No trackbacks yet.