We are using Tridion 2011 SP1. While generating site map XML in .NET templating code, we came across an issue. The requirement is to show only those structure group/pages in site map XML that are published against the publication target for which the site map xml is currently generated. For this we are using below API call.
PublishEngine.IsPublished(structureGroup, engine.PublishingContext.PublicationTarget, true);
The above call will be made against each structure group and page and hence is causing performance overhead in generating sitemap XML.
Is there any better way to achieve solution for above? For example: is there any API call available that accepts bulk structure group/page ids and return the publish status for them in a single shot?