title: Effect of Generics on the execution time
body: <p>I have a class which gets data from data base and sends to UI to generate charts.</p>
  
  <p>The execution time of the class is 14 seconds   </p>
  
  <pre><code>    List listOfCLI =new ArrayList();
  List listOfRRV =new ArrayList();
  List listOfROP =new ArrayList();
  List listOfACR =new ArrayList();
  List listOfPIN =new ArrayList();
  List listOfRIS =new ArrayList();
  List listOfTAA =new ArrayList();
  List listOfTAR =new ArrayList();
  List listOfPHA =new ArrayList();
  List listOfSAR =new ArrayList();
  List listOfGRQ =new ArrayList();
  List listOfADC =new ArrayList();
  </code></pre>
  
  <p>When i change the code to</p>
  
  <pre><code> List&lt;DataMS&gt; listOfCLI =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfRRV =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfROP =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfACR =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfPIN =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfRIS =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfTAA =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfTAR =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfPHA =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfSAR =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfGRQ =new ArrayList&lt;DataMS&gt;();
  List&lt;DataMS&gt; listOfADC =new ArrayList&lt;DataMS&gt;();
  </code></pre>
  
  <p>the execution time goes up to 17 seconds..
  Why did addition of the Generic suggested by eclipse has such  an adverse impact.</p>
  
  <p>Also can you suggest the optimal way of using Generics to reduce the execution time </p>
  
  <pre><code>**Map&lt;String, List&gt; reqCLI =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqRRV =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqROP =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqACR =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqPIN =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqTAA =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqTAR =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqRIS =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqPHA =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqSAR =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqGRQ =new HashMap&lt;String, List&gt;();
          Map&lt;String, List&gt; reqADC =new HashMap&lt;String, List&gt;();
  
          List&lt;Map&lt;String, List&gt;&gt; listCLI=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listRRV=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listROP=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listACR=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listPIN=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listTAA=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listTAR=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listRIS=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listPHA=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listSAR=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listGRQ=new ArrayList&lt;Map&lt;String, List&gt;&gt;();
          List&lt;Map&lt;String, List&gt;&gt; listADC=new ArrayList&lt;Map&lt;String, List&gt;&gt;();**
  </code></pre>
  
  <p>these are the remaining collection's used </p>