title: Improving performance of ifstream in c++
body: <p>I apologize if this question is a bit vague or just plain stupid, I am still very much a novice.</p>
  
  <p>I need to extract information from a web log file in c++. The string manipulations are relatively, accessing the data in a timely fashion isn't. 
  What I am doing currently</p>
  
  <p><code>string str;</code></p>
  
  <p><code>ifstream fh("testlog.log",ios::in);</code></p>
  
  <p><code>while (getline(fh,str));</code></p>
  
  <p>From here I get the useful data from the string. This works fine for a log file with 100 entries, but takes forever on a log file with million+ entries.
  Any help would greatly be appreciated</p>