<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">Hello,<br /><br>
<br /><br>
After entering large directory but before displaying its contents, Dolphin spends some time laying out item in a view (QListViewPrivate::doItemsLayout()). Of that time about 42% is spent getting icon name for each KFileItem. It is slow operation, because of mime-&gt;is("application/x-desktop") check, which constructs KMimeType object for application/x-desktop type again and again. Attached patch adds fast path to KMimeType::is by allowing to ignore resolving aliases. It is not a problem in case of KFileItem, because application/x-desktop is not an alias.<br />This makes KFileItem::iconName() about 4x times faster on first use.<br />It messes with kdecore so I would like to get second opinion on this patch.<br /><br /> Another possible optimization: for each item, KFileItemDelegate checks actual size of file icon. Is this really necessary? Or maybe it would be enough to check size for first icon in the view and then reuse it.</p></body></html>