Below is a small C# demo class which logins in to a WorkSite server, does a search and then logs out. The relative timing of the 3 longest method calls with their cumulative times (in milliseconds) for the 10 iterations are as follows:
IManage.IManSession.Logout 10058.841369
IManage.IManSession.TrustedLogin 457.125693
IManage.IManSession.SearchWorkspaces 171.981618
The timings are roughly the same for both trusted and non-trusted logins. I'm intrigued by the disproportionate time it takes to logout and this has serious implications for our architecture which aims to minimise connection persitence. Can anyone from Interwoven try this demo class out and give me an explanation as to why this should be. We are on WorkSite 8.1.
Regards
Neil McLaughlin
==============================================================
using System;
using System.IO;
using IManage;
namespace ConsoleApplication3
{
public class DemoClass
{
private IManDMS m_dms = new ManDMSClass();
private IManSession m_session;
public DemoClass()
{
m_session = m_dms.Sessions.Add("ml-smith");
}
public void Login()
{
m_session.TrustedLogin();
}
public void Logoff()
{
m_session.Logout();
}
public void DoStuff()
{
Login();
ManStrings databaseList = new ManStrings();
databaseList.Add(m_session.PreferredDatabase.Name);
IManProfileSearchParameters profileFolderParams = m_dms.CreateProfileSearchParameters();
IManWorkspaceSearchParameters workspaceSearchParameters = m_dms.CreateWorkspaceSearchParameters();
workspaceSearchParameters.Add(imFolderAttributeID.imFolderName, "My Workspace");
IManFolders retFolders = m_session.SearchWorkspaces(databaseList, profileFolderParams, workspaceSearchParameters);
Console.WriteLine("Session: " + m_session.UserID + " Count: " + retFolders.Count.ToString() );
Logoff();
}
[STAThread]
static void Main(string[] args)
{
DemoClass demoClass = new DemoClass();
for (int i=0; i < 10; i++)
{
demoClass.DoStuff();
}
}
}
}
Edited by neilm on 10/10/05 10:12 AM (server time).