How to remove extra white spaces and line breaks from HTML in drupal 7
Agree with rooby, whitespace in html does not slow down the site performance.

You can use the Minify module to remove extra line breaks and whitespace before and after HTML tag. 

Minify also minimize the JavaScript files. Minimized JavaScript files are smaller in size as compare to regular JavaScript files. Smaller size will helps you to load site faster.

To use Minify


Download and install minify module
Go to performace
Select minify HTML
To minify JavaScript files select Minify JavaScript files in upper right corner