If you have a hardware encoder available, make sure that is selected. If not, x264 is usually the best software encoder although you will need to follow the download link to install it.

Obviously, don't have any unneeded apps running the background while you are recording.

Can't really say any more than that without knowing more specifics.