[vlc-devel] [RFC] Directory access: use a decent insertion order
Rémi Denis-Courmont
remi at remlab.net
Sat Feb 13 23:30:25 CET 2010
Le dimanche 14 février 2010 00:04:28 Antoine Cellerier, vous avez écrit :
> I'd like to modify the directory access to make it insert
> file in alphabetical order instead of the current "random"
> order (well, natural sort order, not really alphabtical.
AFAICT, unless you've randomized the playlist, the order is whatever the
filesystem uses (which is not random). At least mpg123 and ogg123 exhibit the
same order.
> See
> http://svn.rockbox.org/viewvc.cgi/trunk/firmware/common/strnatcmp.c?view=ma
> rkup for rockbox's implementation of the comparison function.
That code looks either way too complicated (just to get alphanumeric order) or
way too simple (to get proper Unicode ordering).
> To make things short, it basically considers numbers as a single
> character so that "2 - something" would come before
> "10 - something else")
>
> Would anyone oppose such a move?
The current code which has almost constant memory consumption(*) and strictly
bound I/O and CPU usage in every Block() call. As such, you can still use VLC
while it is loading a large file system tree of any size. To preserve bound
I/O while sorting would involve major changes to access_t, which I definitely
don't want to do before 1.1 is branched. Therefore I against any change for
the next release series.
(*) The guy who designed the tree structure inside VLC extension to XSPF
probably did not understand how XML works. This is completely brain damaged.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list