tcpdump or a pcap should probably show something fairly obvious for a 40 second delay. But my guess is path mtu problems. I've written a test for this; it's unpolished but might help you out.
click start, and wait for the test to finish. If the table shows notes other than OK in the right column, you might have an issue. If you do, probably you can fix it by applying MSS clamping on your internet router, or manually setting an MTU appropriate to your connection.