Pacman

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.
Tasklist

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
Task Type Feature Request
Category
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Very Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

When 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.
   p283-listsort.patch (3.5 KiB)
   p284-syncgroup-sort.patch (1.8 KiB)
This task depends upon

Closed by  Judd Vinet (judd)
Saturday, 18 September 2004, 03:30 GMT
Reason for closing:  Implemented
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.

Loading...