I have investigated further, and realised there is some iteration after which is causing the delay.
A snippet of the iteration is:
foreach (MsProject.LookupTableEntry entry in outlineCode.LookupTable)
found = true;
Is there anything I could do to speed up the process? Any help would be appreciated.