Optimization: Folder browse modes

ImapX allows you to optimize the folder browsing to reduce the number of requests to server.

Lazy or complete folder structure requesting

By default, ImapX will load two levels of your folder tree when you access the Folders property. The subfolders which are deeper, will be request on demand. If you like to request the whole folder structure right on first access, simply change the client behavior:

/* .. Init client, authenticate .. */          
client.Behavior.FolderTreeBrowseMode = FolderTreeBrowseMode.Full; 

Warning: If you set the browse mode to Full and your folder structure has cycles, you will end up in an infinite loop!

Automatic examination of folders

By default ImapX will examine folders (e.g request the total number of messages and recent messages) when the tree structure is loaded. If you don't need this information right away, you can disable the automatic examination.

/* .. Init client, authenticate .. */          
client.Behavior.ExamineFolders = false; 

Last edited Oct 17, 2013 at 10:24 PM by pavel_azanov, version 6