title: How to improve load performance of icons and application names?
body: <p>I have this code to load icon and application name , but it is slow for more than 50 application and it takes 7-8 sec to load , how to load application name and Icon faster ?</p>
  
  <pre><code>private void loadApps() {
              Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
              mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
              InternalDataManager.apps = getPackageManager()
                      .queryIntentActivities(mainIntent, 0);
              PackageManager pm = getPackageManager();
  
              for (int i = 0; i &lt; InternalDataManager.apps.size(); i++) {
  
                  ResolveInfo info = InternalDataManager.apps.get(i);
  
                              // PInfo holds name and icon
                  PInfo infoP = new InternalDataManager.PInfo();
  
                  infoP.appname = info.activityInfo.applicationInfo.loadLabel(pm)
                          .toString();
  
  
                  infoP.icon = info.activityInfo.loadIcon(pm);
  
                  infoP.pname = info.activityInfo.applicationInfo.packageName;
  
  
  
              }
          }
  </code></pre>