I just removed a few uses of the heapq module and wanted to post a few comments about it. See: http://trac.edgewall.org/changeset/5148
In the timeline heapq was used to sort the events. Based on these benchmarks using heapq is much slower than the Python sort(), especially in Python 2.3: http://mail.python.org/pipermail/python-list/2005-January/304291.html So "maxrows" would have to be very small compared to the full list size for heapq to be faster than sort(). The other place was in the version control API where heapq was used to get the "best" version control connector. For a single item using max() will always be faster than heapq. So, I just wanted to mention that you should check whether max() or sort() will work before using the heapq module. -- Matt Good --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
