Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#1247 - pacman list.c sort on insert
Attached to Project:
Pacman
Opened by Kevin Piche (kpiche) - Thursday, 12 August 2004, 11:13 GMT
Last edited by Judd Vinet (judd) - Tuesday, 17 August 2004, 18:27 GMT
Opened by Kevin Piche (kpiche) - Thursday, 12 August 2004, 11:13 GMT
Last edited by Judd Vinet (judd) - Tuesday, 17 August 2004, 18:27 GMT
|
DetailsWhen program builds a large list and then sorts it's usually just as efficient to sort the list elements on insertion. This patch adds a function list_add_sorted and modifies db_loadpkgs to use it. It makes the function cleaner and removes the realloc/array kludge.
Timing tests of 'pacman -Q' showed no real change for 200 runs. I can attach further patches to modify the other list_sort usages if this meets approval. |
This task depends upon
Comment by Judd Vinet (judd) -
Monday, 23 August 2004, 01:57 GMT
Looks good. I'll add it for the next release.
Comment by Kevin Piche (kpiche) -
Monday, 23 August 2004, 02:10 GMT
Coolness. I'll work on removing the other qsort uses.
Comment by Kevin Piche (kpiche) -
Thursday, 09 September 2004, 00:19 GMT
New patch to use list_add_sorted in pacman_sync.
p283-listsort.patch