Presumably you mean you have a VNC server running on your Ubuntu desktop, and when viewing this desktop from a client on another host you get a lot of lag?
If so, is the VNC server machine plugged into a monitor or is it headless? If headless, then you may be running into a known X server bug. There is a workaround for this which works for me: install xserver-xorg-video-dummy-lts-xenial on the VNC server machine and add a dummy display config in your xorg.conf file (there is an example in the answer given at
https://askubuntu.com/questions/1022093/teamviewer-slow-on-ubuntu-without-monitor-16-04).