If you use an integrated graphics card or other low end card... expect lag running two different things at the same time. Interestingly, if you minimize one of the windows (just listening to youtube and not watching the video OR idle in the game for a bit while watching a video) the lag is removed. If you have a high end video card, you may be able to run many more visual things before any lag is noticeable.
Also, in addition to minimizing a window, switching to another tab will also work.