I've developed a console application for looping through all the webs inside my SharePoint 2010 site, but it's kind of slow, until the point that it throws OutOfMemory exception. This is the code I use (although that example is for a webpart...the way of iterating the site applies for a console application as well).
What I need to do is to loop through each web within a site, and then loop through each folder within each document library. This is because we're indexing all these data for another purposes.
Does anybody know about a better and faster way?