Outlook calling CompareEntryId a lot after calling GetHierarchyTable

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Paul Mateer (p.mateer_at_meridio.com)
Date: 03/11/04


Date: 11 Mar 2004 07:33:47 -0800

Whilst analysing the performance of my message store I have encountered
behaviour which I am curious about and would be interested if anyone
could perhaps offer an explanation for.

The basic problem involves Outlooks behaviour when I click on the +
symbol beside a folder in the folder view pane.
When I do this Outlook calls the GetHierarchyTable function on the
folder object in my message store that relates to the particular folder
being expanded.
It then performs various operations on the table object which set up by
the call to GetHierarchyTable.

Nothing strange there, however Outlook then seems to perform a huge
number of calls to CompareEntryIDs on the IMsgStore object, and the
number of calls made seems to depend upon the number of entries placed
in the hierarchy table. For example consider the following folder
hierarchy:

Reports
   |- 2002 Reports
   |- 2003 Reports
   |- 2004 Reports

After the Reports folder is expanded, the sequence of calls to
CompareEntryIDs is as follows:

Compare entry Id for folder "2002 Reports" against entry Id for folder
"Reports"
Compare entry Id for folder "2002 Reports" against entry Id for folder
"2002 Reports"

Compare entry Id for folder "2003 Reports" against entry Id for folder
"Reports"
Compare entry Id for folder "2003 Reports" against entry Id for folder
"2002 Reports"
Compare entry Id for folder "2003 Reports" against entry Id for folder
"2003 Reports"

Compare entry Id for folder "2004 Reports" against entry Id for folder
"Reports"
Compare entry Id for folder "2004 Reports" against entry Id for folder
"2002 Reports"
Compare entry Id for folder "2004 Reports" against entry Id for folder
"2003 Reports"
Compare entry Id for folder "2004 Reports" against entry Id for folder
"2004 Reports"

It looks as though for every entry added to the hierarchy table, Outlook
is walking down a list of entry Ids (which consists of the the parent
folder entry Id and each child folders entry Id) until it gets a match.

This might not be a problem in the above scenario where there a just a
few sub-folders, but in a scenario where the parent folder has over 1000
child folders the time taken by Outlook to perform this "list walk"
comparison far exceeds the time taken to populate the table (by anything
up to a factor of 10). As you can imagine Outlooks performance when
opening such a folder in my message store is less than perfect.

So, can anyone shed any light on why on earth Outlook might be doing
this, and more importantly is there anything that I might be able to do
to prevent it from doing this?

Paul Mateer
Meridio Limited



Relevant Pages

  • Re: Curiosity: Folder pop-up on boot-up
    ... The last entry is missing quotes. ... After you extract the files from the zip folder run ... look under Startup for an entry titled CCC.lnk. ... Windows XP Startup Tracker ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Curiosity: Folder pop-up on boot-up
    ... The last entry is missing quotes. ... After you extract the files from the zip folder run ... look under Startup for an entry titled CCC.lnk. ... Copy the information under each of the Registry entries ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: FindRow on Exchange
    ... You can request PR_STORE_ENTRYID from the parent folder just before ... OutlookSpy - Outlook, CDO ... I forgot that you can't compare entry ids directly. ...
    (microsoft.public.win32.programmer.messaging)
  • Re: FindRow on Exchange
    ... You can request PR_STORE_ENTRYID from the parent folder just before ... OutlookSpy - Outlook, CDO ... I forgot that you can't compare entry ids directly. ...
    (microsoft.public.win32.programmer.messaging)
  • Re: FindRow on Exchange
    ... EX provider returns short term entry ids from the folder contents table. ... folder in every data store and do a FindRow for my property. ... mean that it does not match the ENTRYID of the item that I am looking for. ...
    (microsoft.public.win32.programmer.messaging)