Feature Proposal: General Sorting Mechanism for TWiki
Motivation
Currently:
- Each module and plugin has its own sort functions
- Lists are often not sorted case-insensitive because of fear of performance loss, resulting in (for humans) strange word order (see for example Bugs:Item2135
)
- Key sort can be made more efficient
It would be useful to have one sorting mechanism that core code and plugins can use. This core sort code can be tested.
Proposal
Add a sorting lib to the distributed
CPAN directory.
Description and Documentation
I was triggered by
A Fresh Look at Efficient Perl Sorting
. It is a widely quoted paper that has resulted in
CPAN:Sort::Maker
-
A simple way to make efficient sort subs.
I can see 2 alternatives to use:
More info on sorting
- CPAN:Sort::External
for sorting huge lists - Problem: You have a list which is too big to sort in-memory. Solution: "feed, finish, and fetch" with Sort::External, the closest thing to a drop-in replacement for Perl's sort() function when dealing with unmanageably large lists.
--
Contributors: ArthurClemens
Discussion
I will investigate how the two libraries perform.
--
ArthurClemens - 26 Oct 2008
Decided at
HelsinkiReleaseMeeting2009x04x20 to park this proposal until use case understood and owner found.
--
PeterThoeny - 2009-04-20
Use cases:
- IP addresses (e.g., see FormattingIp)
- I have added priorities of 'High', 'Medium', 'Low' to my installation of Action tracker. They don't sort well either unless I prefix a number.
- Last but not least: sort on multiple table columns! (e.g., SearchOrderOnMoreColumns)
--
SeanCMorgan - 2009-04-21