title: Should I preload images in java like this?
body: <p>I need to read an image from the file and convert it into <code>BufferedImage</code> using <code>ImageIO</code> like this:</p>
  
  <pre><code>BufferedImage temp = ImageIO.read(new File("temp.png"));
  </code></pre>
  
  <p>This will be repeated about 30 times in 1 second with many different files. I am worried that those will be uploaded late. Should I preload them into arrays or lists like this?</p>
  
  <pre><code>BufferedImage temp[]; //Or List&lt;BufferedImage&gt;
  for(i=0;i&lt;30;i++){
      temp[i] =  = ImageIO.read(new File("temp.png"));
  }
  </code></pre>