On my WinXP system WinMerge takes over 2 seconds to start, even with a warm cache. This is due to code in BCMenu::GetTransparentBitmap() that loops using GetPixel/SetPixel which is very slow (see http://sourceforge.net/tracker/index.php?func=detail&aid=1052762&group_id=13216&atid=113216 for a similar problem). Attached is a replacement version which uses BitBlt and is much faster. With this my startup time drops to about 0.5s.
I think even more improvement could be possible if the menu icons were all loaded via BCMenu::LoadToolbar() instead of using BCMenu::ModifyODMenu(). This would load a few large bitmap resources instead of many small ones. It would require several toolbars just for this purpose so I'm not sure if it is desirable.
Log in to post a comment.