Pre-Loading Schema Topic IDs |
Top Previous Next |
One aspect of the schema that greatly affects the application initialization time is time spent retrieving the unique TMCore topic IDs that correspond to subject identifiers in the map. With a complex schema, it may take over 100 web service invocations to build a map caching subject identifier to topic ID. Fortunately this process can be mitigated by using the NetworkedPlanet.EPiServerModule.IdentityHelper.PreloadTopicIDs(string) method. This method causes the module to precache the topic IDs of any topics that have a subject identifier that match the parameter passed to this method. You can call PreloadTopicIDs at any point after the web application has initialized, for example you have add a call during Application_Start in global.asax.cs as shown here: protected void Application_Start(Object sender, EventArgs e) { development.Templates.Wsrp.Core.ProducerBaseSupport.InitializePortlets(); IdentityHelper.PreloadTopicIDs("http://www.networkedplanet.com/psi/%"); // Preload all topic IDs where subject ID starts with the pattern shown }
|