[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 307585] Sorting is too cpu intensive for big folders
From:       Mark <markg85 () gmail ! com>
Date:       2012-09-30 12:36:46
Message-ID: bug-307585-17878-IqWO8RDRjx () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=307585

--- Comment #7 from Mark <markg85@gmail.com> ---
I don't think i need debug symbols for Qt. I do have a Qt debug build here and
can just link to that, but that doesn't really help a lot since the sorting is
a custom thingy done in Dolphin code, not in Qt.

The thing i keep thinking is that everything is in place to work fast but that
the right calls are not done. For example, i think this would do the trick:

void KFileItemModel::insertItems(const KFileItemList& items)
{
...
QList<ItemData*> sortedItems = createItemDataList(items);
qSort(sortedItems.constBegin(), sortedItems.constEnd(),
KFileItemModel::lessThan);
All sorting DONE!
...
some housekeeping as in updating indexes
certainly no other complex things
}

However, that doesn't work because KFileItemModel::lessThan is a class member
and requires other class members to work. qSort needs a global function there.

I know this is a lot faster and cleaner + that it completely ignores
KFileItemModelSortAlgorithm::sort which is very slow anyway. I just have to get
the above working :)

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic