Filed Under (Code) by mark on 05-06-2005

I’ve made a small, but important update to CAsyncResolver in OW32. This adds a local “hosts” file cache, which dramatically speeds up looking up the obvious (localhost) as well as all the rest of the entries using a couple of STL maps. Basically I did this for Yam, my MTA-in-development, as it was proving the biggest bottleneck for looping messages around between a pair of them. In order to use the cache, you need to create and pass a CFileWatcher to CAsyncResolver::initialise. I suppose strictly, this doesn’t need to be a requirement, but it will do for now — I can’t imagine a situation under which you _wouldn’t_ want the hosts file cache to get updated when the hosts file changes.

Next will be more IMAP, I think, although I might write some notes up on a few historical bits of code first.

Leave a Reply

× 8 = forty