Index: /trunk/src/VBox/Frontends/VirtualBox/src/UIVMListView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/UIVMListView.cpp	(revision 30061)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/UIVMListView.cpp	(revision 30062)
@@ -29,4 +29,5 @@
 #include <QFileInfo>
 #include <QLinearGradient>
+#include <QPixmapCache>
 
 #if defined (Q_WS_MAC)
@@ -581,7 +582,13 @@
             break;
         }
+        case OSTypeIdRole:
+        {
+            v = m_VMItemList.at(aIndex.row())->osTypeId();
+            break;
+        }
         case UIVMItemPtrRole:
         {
             v = qVariantFromValue(m_VMItemList.at(aIndex.row()));
+            break;
         }
     }
@@ -743,5 +750,5 @@
 
 QSize UIVMItemPainter::sizeHint(const QStyleOptionViewItem &aOption,
-                                   const QModelIndex &aIndex) const
+                                const QModelIndex &aIndex) const
 {
     /* Get the size of every item */
@@ -759,20 +766,55 @@
 }
 
-void UIVMItemPainter::paint(QPainter *aPainter, const QStyleOptionViewItem &aOption,
-                               const QModelIndex &aIndex) const
-{
-    QStyleOptionViewItem option(aOption);
-    /* Highlight background if an item is selected in any case.
-     * (Fix for selector in the windows style.) */
-    option.showDecorationSelected = true;
-
-    /* Start drawing with the background */
-    drawBackground(aPainter, option, aIndex);
-
-    /* Blend the content */
-    blendContent(aPainter, option, aIndex);
-
-    /* Draw a focus rectangle when necessary */
-    drawFocus(aPainter, option, option.rect);
+void UIVMItemPainter::paint(QPainter *pPainter, const QStyleOptionViewItem &option,
+                            const QModelIndex &index) const
+{
+    /* Generate the key used in the pixmap cache. Needs to be composed with all
+     * values which might be changed. */
+    QString key = QString("vbox:%1:%2:%3:%4:%5:%6")
+        .arg(index.data(Qt::DisplayRole).toString())
+        .arg(index.data(UIVMItemModel::OSTypeIdRole).toString())
+        .arg(index.data(UIVMItemModel::SnapShotDisplayRole).toString())
+        .arg(index.data(UIVMItemModel::SessionStateDisplayRole).toString())
+        .arg(option.state)
+        .arg(option.rect.width());
+
+    /* Check if the pixmap already exists in the cache. */
+    QPixmap pixmap;
+    if (!QPixmapCache::find(key, pixmap))
+    {
+        /* If not, generate a new one */
+        QStyleOptionViewItem tmpOption(option);
+        /* Highlight background if an item is selected in any case.
+         * (Fix for selector in the windows style.) */
+        tmpOption.showDecorationSelected = true;
+
+        /* Create a temporary pixmap and painter to work on.*/
+        QPixmap tmpPixmap(option.rect.size());
+        tmpPixmap.fill(Qt::transparent);
+        QPainter tmpPainter(&tmpPixmap);
+
+        /* Normally we operate on a painter which is in the size of the list
+         * view widget. Here we process one item only, so shift all the stuff
+         * out of the view. It will be translated back in the following
+         * methods. */
+        tmpPainter.translate(-option.rect.x(), -option.rect.y());
+
+        /* Start drawing with the background */
+        drawBackground(&tmpPainter, tmpOption, index);
+
+        /* Blend the content */
+        blendContent(&tmpPainter, tmpOption, index);
+
+        /* Draw a focus rectangle when necessary */
+        drawFocus(&tmpPainter, tmpOption, tmpOption.rect);
+
+        /* Finish drawing */
+        tmpPainter.end();
+
+        pixmap = tmpPixmap;
+        /* Fill the  cache */
+        QPixmapCache::insert(key, tmpPixmap);
+    }
+    pPainter->drawPixmap(option.rect, pixmap);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/UIVMListView.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/UIVMListView.h	(revision 30061)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/UIVMListView.h	(revision 30062)
@@ -40,4 +40,5 @@
     QString name() const { return m_strName; }
     QIcon osIcon() const { return m_fAccessible ? vboxGlobal().vmGuestOSTypeIcon(m_strOSTypeId) : QPixmap(":/os_other.png"); }
+    QString osTypeId() const { return m_strOSTypeId; }
     QString id() const { return m_strId; }
 
@@ -96,4 +97,5 @@
            SessionStateDecorationRole,
            SessionStateFontRole,
+           OSTypeIdRole,
            UIVMItemPtrRole };
 
