Opened 12 years ago

Closed 12 years ago

#6550 closed patch (fixed)

Speed up search lists.

Reported by: Marc Alban <marcalban@…> Owned by: danielk
Priority: minor Milestone: 0.22
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


Currently the 'Time' search list is extremely slow. On my Pentium 4 3.2Ghz machine it uses 100% cpu for 90 seconds to display the list.

The vast majority of the time is spent stepping through the ProgramList? inefficiently.

Attached is a small patch which steps through the list more efficiently and reduces the time on my machine to only 10 seconds.

Attachments (1)

speedup.patch (829 bytes) - added by Marc Alban <marcalban@…> 12 years ago.
patch to speed up the search list screens.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by Marc Alban <marcalban@…>

Attachment: speedup.patch added

patch to speed up the search list screens.

comment:1 Changed 12 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newaccepted

comment:2 Changed 12 years ago by danielk

Resolution: fixed
Status: acceptedclosed

(In [20558]) Fixes #6550. Marc Alban spotted and fixed an O(n) search for the next item in a linked list for each item 1..n in a linked list.. Applied patch that replaces search with an O(1) iterator incrementation.

Note: See TracTickets for help on using tickets.