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

List:       kfm-devel
Subject:    Re: Ideas for improving sorting. Goal: under 1 second for 200.000 files.
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2012-10-23 23:22:00
Message-ID: 201210240122.00559.christoph () maxiom ! de
[Download RAW message or body]

On Wednesday 24 October 2012 01:13:40 Christoph Feck wrote:
> Speed of comparing the sequences is that of a memcpy()

Of course I meant memcmp().

> So what you have to work on before doing anything else, is to ask
> Frank, if he is okey with adding a sort key (QByteArray basically)
> for each file item. Your code would have to make sure it is always
> updated on file renames, locale changes, sort mode changes
> (natural vs. simple) etc.

Another idea is to not store this side information "permanently", but 
only create it temporarily when sorting. So you effectively only sort 
a list with side information.

	struct SortEntry
	{
		QByteArray collatingKey;
		KFileItem *fileItem;
	};

Christoph Feck (kdepepo)
[prev in list] [next in list] [prev in thread] [next in thread] 

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