A vim clipboard problem

For a while I have found pasting into vim from GTK2 applications (like firefox) really slow. When this performance bug happens the source application hangs for several seconds until the text finally appears within vim. This is vim 7.0.

I have searched for this problem a lot and not found a comprehensive solution, so I assume it is a fairly obscure problem.

The bug only occurs when running vim in a terminal; the GTK2 driven gvim works fine. Unfortunately I run vim in a terminal a lot. I have found that if I use gnome-terminal the problem also goes away. I have stopped investigating now, because I use gnome-terminal anyway. The reason it didn’t work for me before is that I had an alias specifying --disable-factory and --sm-disable. This dated back to days when gnome-terminal wasn’t stable enough to trust any sort of cooperation amongst terminals. Now I’ve stopped using these options vim works much better and the terminals load faster too.

Now I have the problem again even with the change above; I am not sure what I changed. Possibly due to having rebooted without going in to Gnome to see if there is a problem there? Also I notice QT apps (like konqueror) are slow to paste into vim in a gnome-terminal. Anyone know where any of this is documented? Maybe there is/should be some freedesktop.org standard for this?