I had the following problem with my Macbook Pro for a while. When connected to the network at work (either through WiFi or ethernet cable) the laptop would work OK. However, when travelling or taking my MBP home, performance would start degrading to a point where launching something like Dictionary or saving a file would take almost half a minute.
After playing for a while with the computer I found where the computer was wasting all this time, which was not in CPU or disk access. Using Console.app and checking system.log, I found several instances of ‘DirectoryService[46]: Active Directory: Could not determine closest Domain Controller from Site information in directory’. After some digging I did use sudo killall -USR1 DirectoryService in Terminal to send debugging information to /Library/Logs/DirectoryService/DirectoryService.debug.log.
Looking in the previous file, I realised that every time the computer had a delay, it would spend 25 seconds trying to reach a LDAPv3 server at the university. Following Roger’s suggestion I used Directory Access.app to disable Active Directory and LDAPv3. This sorted out the delays, but created several negative side effects (I could not mount my user folder in the network, for example).
Finally, Roger cleared a bunch of preference files and re-bound my computer to the network. It seems that at no time there were any hardware issues, but it was a rather unfortunate combination of misconfigured files due to changes in the university network.
Keyword: Apple.