I've a NAS. From a windows machine it takes 1 or 2 seconds to access shared folders. From Ubuntu (11.10) it takes half a minute only to shows me the credential dialog box and another half to log in the shared folder. Furthermore when I close and reopen my laptop's lid a broken pipe error is raised and I have to reconnect to the NAS.
I found out that the issue was due to a host resolution.
To solve add IP to /etc/hosts using the server name as hostname. In my case: