frank78ac at googlemail.com
Fri Oct 26 19:15:46 BST 2012
Emmanuel is currently working on implementing a parallel sort
algorithm for Dolphin to speed up loading very large folders .
Sorting takes quite long due to the complexity of 'natural' sorting,
which uses the comparison function KStringHandler::naturalCompare().
There are ideas how to make the comparison faster (for some
discussion, see ), but thanks to the elegance of QtConcurrent, the
easiest way to get a short-term performance increase is using a
parallel sort algorithm.
Obviously, the parallel sort algorithm requires that all functions
involved in comparing items, in particular
KStringHandler::naturalCompare(), are reentrant. Now the API docs of
KStringHandler  say that "The methods here are completely
stateless", which sounds a bit vague. Does anyone mind if I add "This
function is reentrant" to the docs of
KStringHandler::naturalCompare(), just to be sure that no
modifications can be made that would break our sort algorithm? The
code looks like it really is reentrant, even thread-safe.
More information about the kde-core-devel