title: Reading a text file using BufferedReader.readLine() is too slow
body: <p>I am trying to read a text file which contains about 1000 very long lines. Entire file stands at about 1.4MB. 
  I am using BufferedReader's readLine method to read file. What happens is it takes 8-10 seconds to print the output on console. I tried the same using fgets of php and it prints all the same lines in blink of an eye!!! How is it possible?
  Below is the code I am using</p>
  
  <pre><code>import java.io.BufferedReader;
  import java.io.FileInputStream;
  import java.io.FileNotFoundException;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  
  public class ClickLogDataImporter {
      public static void main(String [] args) {
          try {
              new ClickLogDataImporter().getFileData();
          } catch (Exception ex) {
              Logger.getLogger(ClickLogDataImporter.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  
      public void getFileData() throws FileNotFoundException, IOException {
          String path = "/home/shantanu/Documents";
          BufferedReader br = new BufferedReader(new InputStreamReader(
                  new FileInputStream(path+"/sample.txt")));
          String line = "";
          while((line = (br.readLine())) != null) {
              System.out.println(line);
          }
  
      }
  }
  </code></pre>
  
  <p>PHP code</p>
  
  <pre><code>&lt;?php
      $fileName = "/home/shantanu/Documents/sample.txt";
      $file = fopen($fileName, 'r');
      while(($line = fgets($file)) != false) {
          echo $line."\n";
      }
  ?&gt;
  </code></pre>
  
  <p>Please enlighten me about this issue</p>